The House passed a symbolic measure Friday backing a two-state solution to the Israeli-Palestinian conflict — an implicit rebuke to President Trump that passed mostly along party lines.

The measure was the latest example of House Democrats wading into the divisive realm of U.S.-Israel relations, an outgrowth of a broader controversy over the party’s weakening support for Israel’s right-wing government and its willingness to police seemingly anti-Semitic remarks by members of its ranks.

The vote was 226 to 188, with five Republicans breaking ranks and joining Democrats in backing the resolution.

The legislation declares that “only the outcome of a two-state solution … can both ensure the state of Israel’s survival as a Jewish and democratic state and fulfill the legitimate aspirations of the Palestinian people for a state of their own.”

It also notes longtime U.S. opposition to “settlement expansion, moves toward unilateral annexation of territory, and efforts to achieve Palestinian statehood status outside the framework of negotiations with Israel” — an implicit critique of Trump’s moves to legitimize Israel’s increasingly assertive behavior in the West Bank and Golan Heights.

In a major shift in policy, Secretary of State Mike Pompeo last month declared that the United States would no longer consider Israeli settlements in the West Bank to be illegal — a shift that drew praise from the Israeli government and condemnation from Palestinian leaders.

The resolution, written by Rep. Alan Lowenthal (D-Calif.), was penned as a companion to a measure condemning the boycott, divestment and sanctions movement targeting Israel that passed in July, but internal disputes among Democrats delayed it until Friday.

While it does not specifically mention the latest Trump administration moves, the message it sends opposing them was clear during the floor debate Friday.

Lowenthal told the House that his resolution backed “the only path to a just and lasting peace in the Middle East.”

“We will never compromise on Israel’s security, and we will not turn our backs on the Palestinian people’s desire for dignity and justice,” he said. “Some ask why Congress should speak out now or in this way? To them I say this: When peace appears most remote, our voices become more critical, not less.”

Rep. Lee Zeldin (R-N.Y.), a stalwart supporter of Israel’s right-wing government, accused Democrats of deciding to “play partisan politics with what is a powder keg.”

“This resolution before us today is deeply flawed, it’s highly partisan, it’s ill-timed, and it’s poorly crafted,” he said Friday. “This is the worst timing possible: [The resolution] comes to the floor just one week after Israel was bombarded with over 450 rockets. But in all the pages of this resolution, guess where it mentions Palestinian terrorism? Nowhere.”

To massage internal concerns among Democrats, language was inserted at the behest of several moderate Democrats led by Rep. Josh Gottheimer (N.J.) to express support for the 2016 agreement President Barack Obama reached with Israeli Prime Minister Benjamin Netanyahu to cement a 10-year military aid commitment. Also included was language noting that the United States has long provided “bilateral and multilateral foreign assistance to promote the security, stability, and the humanitarian well-being of Palestinians.”

Still, the four Democrats known as the “Squad” opposed the resolution from the left.

Rep. Rashida Tlaib (Mich.), a Palestinian American who opposes separate states for Israelis and Palestinians, compared the notion of a two-state solution to racial segregation in the United States.

“This resolution not only endorses an unrealistic, unattainable solution, one that Israel has made impossible, but also one that legitimizes inequality, ethnic discrimination, and inhumane conditions,” she said. “Separate but equal didn’t work in our country, and I can’t see it [being] possible in other countries. Given our nation’s history of segregation, we should recognize when such injustices are occurring.”

But Democrats worked to play down any notion of internal dissension. Lowenthal noted that he had met with Tlaib on the issue this week and left the meeting “feeling optimistic.”

“If a Jewish American from Queens and a Palestinian American from Detroit, both proud Americans, can find common ground about the need for all people … to live in peace and security with the same rights to self-determination and dignity, that fills me with hope,” Lowenthal said.

Joining Tlaib in opposing the measure were Reps. Alexandria Ocasio-Cortez (D-N.Y.), Ilhan Omar (D-Minn.) and Ayanna Pressley (D-Mass.).

The five Republicans who supported the resolution were Reps. Tom Reed (N.Y.), Francis Rooney (Fla.), Fred Upton (Mich.), Bill Posey (Fla.) and Steve Watkins (Kan.)