Oregon is poised to join an agreement that could see its seven electoral votes handed to presidential candidates who win the popular vote nationally — regardless of who Oregonians choose.

In a widely expected outcome, the House on Wednesday voted 37-22 to approve Senate Bill 870, legislation that allows the state to sign on to the National Popular Vote Interstate Compact.

Once the bill is signed by Gov. Kate Brown, Oregon will join 14 other states and the District of Columbia in pledging to send their electoral votes to whoever wins the popular vote in presidential elections. That agreement wouldn’t kick in until enough states sign on to tally at least 270 electoral votes, the minimum needed to win the presidency.

With Oregon joining up, the compact will include 196 electoral votes, according to the national group pushing the bill.

Wednesday’s vote was all but certain. While Oregon has failed seven times to pass a popular vote bill, many of those failures came because of gridlock in the Senate. The House had passed a bill to join the agreement in four separate sessions.

This year, Senate President Peter Courtney, D-Salem, changed course from previous sessions, allowing SB 870 to receive a vote on the Senate floor, where it passed 17-12. Courtney has held up the bill in the past because he believes voters should decide how Oregon’s electoral votes are awarded.

The bill inspired bitter disagreement between many Democrats and Republicans.

Democrats argue that deciding presidential elections by popular vote would take away the intense campaigning in a handful of battleground states, and force candidates to visit voters around the country. That means reliably blue Oregon could warrant attention for once, they say.

“The Republican presidential candidates write Oregon totally off … and Democratic candidates take Oregon for granted, so we are just relegated to being a spectator state,” said Rep. Alissa Keny-Guyer, D-Portland.

“It is finally possible that Oregon could finally become a battleground state,” noted Rep. Tiffiny Mitchell, D-Astoria, “because all of them will be.”

Proponents also argue that conservative Oregonians could be more likely to vote, if they know voting could influence a national election. Currently, Oregon Republicans have little hope of tilting the state toward a Republican presidential candidate.

“Turns out when people think their vote matters, they are more likely to vote,” said Rep. Julie Fahey, D-Eugene. “I believe that everyone’s vote should be equal no matter where you live.”

But Republicans have labeled the popular vote idea as a trap, and say Democrats are especially keen on pushing it because of the 2016 election, in which President Donald Trump lost the popular vote by 2.8 million votes.

“I view this as a knee-jerk reaction of the people’s current view of who occupies the White House,” said Rep. Cheri Helt, R-Bend, who made clear she did not vote for Trump.

Rep. Mike McLane, R-Powell Butte, said the system would place too much power in cities, where liberal voters are concentrated.

“To suggest that, in the absence of the electoral college, a national popular vote is not completely biased to urban centers is just unfathomable in my mind,” McLane said. “Of course it is, and of course that’s the game plan here.”

McLane further suggested that doing away with the electoral college could jeopardize the country’s tradition of peacefully transitioning power between presidential administrations.

Another Republican, Rep. Bill Post of Keizer, said he also opposed the popular vote compact — but that he had little worry it would come to pass. Republican-led states would need to sign on in order for the agreement to hit 270 electoral votes, he said.

“It has to hit the red states eventually, and the red states will just say ‘no,’” Post said.

Some also said the national popular vote could diminish the influence of small states like Oregon — a key reason Nevada’s Democratic governor recently vetoed a similar bill

Gov. Kate Brown has supported the national popular vote concept for at least a decade, and is expected to sign the bill, meaning its role as a mainstay in legislative sessions has come to an end.

“I always enjoy the national popular vote debate,” House Speaker Tina Kotek said Wednesday, nodding to the bill’s longtime presence in the Capitol. “I do.”

Editor’s note: This story has been updated to reflect the Senate Bill 870 vote tally.