Republican Donald J. Trump won a commanding victory in Connecticut’s presidential primary Tuesday, cementing his position as the front-runner for the Republican nomination as the primary election cycle winds down.

Democrat Hillary Clinton LAW ’73, meanwhile, eked out a narrow victory against Vermont Sen. Bernie Sanders, extending her delegate lead and deepening uncertainty about Sanders’ viability as a candidate. 

With 99 percent of the state reporting early Wednesday, Clinton had secured 51.7 percent of the vote in Connecticut, receiving 27 delegates, while Sanders garnered 46.5 percent and the other 24 delegates. Trump, meanwhile, whipped the Republican field, with 57.7 percent of the vote to Texas Sen. Ted Cruz’s 11.7 percent and Ohio Gov. John Kasich’s 28.5 percent. Having secured over 50 percent of the vote, Trump received all 28 of Connecticut’s delegates.

Both Clinton and Trump took New Haven, with Clinton receiving 57.3 percent of the Democratic vote while Trump swayed 45.4 percent of  Republican voters in the Elm City.

Trump’s victory in Connecticut was part of his sweep of the five states voting Tuesday — Connecticut, Pennsylvania, Delaware, Rhode Island and Maryland — while Sanders nabbed Rhode Island from Clinton.

Sanders performed well in rural Connecticut, but those advantages were erased by Clinton’s heavy victories in Fairfield County and urban centers across the state.

But results in two of the three polling places for on-campus Yale students ran against the grain: At the Ives Branch of the New Haven Free Public Library — the polling place for students registered in Berkeley, Calhoun, Silliman, Timothy Dwight and Trumbull colleges — Sanders won two-thirds of the vote. Only 10 Republicans voted, eight of whom went for Kasich.

Results from the Hall of Records, which is the polling place for students on Old Campus and in Branford, Jonathan Edwards and Saybrook, were closer. There, Sanders won 51.4 percent of the 1,203 votes cast, with Kasich taking 57.7 percent of the 80 Republican voters.

In the Wexler-Grant School in Dixwell — where students in Davenport, Pierson, Morse and Ezra Stiles colleges voted — Clinton took 57 percent of the vote.

In downtown New Haven, the primary was characterized by confusion about voter registration deadlines and polling places. Several voters interviewed at the NHFPL some of whom were Yale students, said they were turned away and told to go to either Wexler-Grant School or the Hall of Records, the two other voting locations for Yale students living on campus.

Many students who voted at the NHFPL in last November’s local elections erroneously returned there on Tuesday, only to be told that their polling location for state and federal elections was at one of the other two polling places for students on campus.

The numbers of Republican voters in the heavily liberal New Haven, which has only 2,712 registered Republicans, were low. Billy Roberts ’19, one of the few who cast a Republican ballot, said he voted for Kasich.

“I anticipate Donald Trump winning the nomination, but part of the reason I came out to vote was that I hope there might be a contested nomination,” Roberts said Tuesday afternoon. “The more support other contenders receive, the less likely [Trump] will become the nominee.”

According to poll moderator Sonya Gilliam, Wexler-Grant — one of the polling stations farther from Yale’s campus — saw slight bumps in voter turnout during common commuting hours. Gilliam said there was otherwise no significant influx of voting throughout the day.

Missed registration deadlines stopped some students from voting. Connecticut has closed primaries, which require any voter switching parties before a primary to do so three months in advance. Voters must be registered with a party five days before a primary to be able to vote.

Karl Notturno ’17 said he failed to register as a Republican in time to vote on Tuesday. Notturno said he had intended to cast his vote for Trump, and cited a feeling of “frustration” with an “incompetent” political establishment.

Parker Liautaud ‘16, who lives in Davenport, expressed discontent with the how far away his polling location in Dixwell is from campus, speculating that the distance would lead to lower turnout.

“It’s going to take me an hour to vote,” Liautaud said at NHFPL, where he had originally gone to vote. “It makes no sense, because my residence is much closer to here than it is to there. It’s not a grave injustice, but it’s kind of a pain.”

Turnout was high at the Hall of Records. Poll moderator Kevin Arnold told the News in the midafternoon that lines were long in the morning, but lightened up just after noon. At one point, he said, the line to vote stretched 50 people deep. 

New Haven was one of 17 municipalities that did not participate in a test of Secretary of State Denise Merrill’s real-time reporting system, completed this month, which provides updated election results across the state on the state’s official website.