Legislative Hall in Dover.

The state House of Representatives voted 24-17 Thursday to approve a bill that would add Delaware to a growing coalition of states trying to elect the president by national popular vote.

The largely party-line vote in the General Assembly’s lower chamber all but assured that Delaware would pledge its three electoral votes to the National Popular Vote Interstate Compact, which seeks to bypass the Electoral College by pledging state’s electoral votes to the winner of the popular vote nationwide, regardless of who a majority of the states’ voters choose to elect.

The Senate passed the measure, SB 22, last week by a 14-7 margin, with two Republican sponsors voting in favor. Gov. John Carney has said he would sign the bill.

The legislation would not altogether abolish the Electoral College, the Constitutional mechanism for electing presidents and vice presidents based on the top vote-getter in each state. Rather, it would provide a workaround to a Constitutional amendment by requiring presidential electors to cast their votes for the candidate who received the most votes in all 50 states and the District of Columbia.

However, the agreement would only go into effect once enough states have signed on to clear the threshold of 270 electoral votes—enough to deliver an automatic victory to the popular vote winner.

So far, 11 mostly “blue” states and the District of Columbia—which have historically supported Democratic presidential candidates in recent elections—have all officially entered the interstate compact, representing 172 electoral votes needed for it to succeed. Along with Delaware, state legislatures in New Mexico and Colorado have also passed the same measure and are awaiting the signatures of their respective governors.

Once those bills are ratified, the total number of pledged electoral  votes would equal 189.

Supporters in Delaware have said the measure was necessary to restore fairness to national elections at a time when only a handful of battleground states can determine the outcome of a presidential election.

But opponents said it would diminish Delaware’s overall influence in presidential elections, and any changes to the Electoral College system should be achieved through a constitutional amendment.

“My objection really is one of process,” state Rep. Timothy Dukes, R-Laurel, said on the House floor. “My concern is this proposal is really an attempt to do an end-run around the requirements of the Constitution.”

Thursday’s vote followed a wave of defections from three House Republicans who had initially co-sponsored the bill but later withdrew their support amid blowback from their constituents. Ultimately, no Republicans in the House voted in favor of the bill, and two Democrats joined their colleagues across the aisle in voting no.

Started in 2006, the compact aims to eliminate so-called “wrong-winner elections,” in which a candidate wins the presidency despite losing the popular vote.

Former President George W. Bush garnered about 540,000 fewer votes than Democratic challenger Al Gore on his way to winning the 2000 presidential election, which was eventually decided in the U.S. Supreme Court. And President Donald Trump in 2016 skated to victory with 304 electoral votes, despite receiving nearly three million fewer popular votes than Hillary Clinton.

In total, four presidents in American history have won the White House and lost the popular vote. The “disconnect” happened twice in the last five presidential elections, each time electing Republicans to the White House while Democrats received more of the aggregate national popular vote.

As it stands, the National Popular Vote Interstate Compact will likely require buy-in from “red” states—which have tended to vote for GOP standard-bearers—or swing states. Realistically, supporters said it wouldn’t have any impact until the 2024 presidential election; however, if agreement were to into effect, it would likely face legal challenges that could delay its implementation.