The House of Representatives overwhelmingly approved a bipartisan resolution Tuesday opposing an international effort to boycott Israel as Democrats try to tamp down increasingly heated political rhetoric over differences with the longtime U.S. ally.

The resolution passed on a vote of 398-17. Reps. Ilhan Omar, D-Minn., Rashida Tlaib, D-Mich., and Alexandria Ocasio-Cortez, D-N.Y., were among the 16 Democrats who voted against the resolution. Rep. Thomas Massie, R-Ky., was the only Republican to vote "no." Rep. Justin Amash, I-Mich., was one of five lawmakers who voted "present."

TRUMP CALLS SQUAD 'NIGHTMARE FOR AMERICA,' SAYS OMAR WILL HELP HIM WIN MINNESOTA IN 2020

The resolution puts the House on record opposing the pro-Palestinian Boycott, Divestment and Sanctions (BDS) movement and its efforts to target U.S. companies that do business with Israel. The movement has grown in recent years, and Israel sees it as a threat. Supporters of Israel view it as an attempt to delegitimize the Jewish state.

Reps. Brad Schneider, D-Ill.; Jerry Nadler, D-N.Y.; Lee Zeldin, R-N.Y.; and Ann Wagner, R-Mo., had introduced the resolution in March.

"A two-state solution remains the best way to justly resolve the Israeli-Palestinian conflict and ensure a future for two peoples living side-by-side in peace, security and prosperity," the resolution said. "By denying the Jewish claim to a homeland, the BDS Movement is fundamentally incompatible with a two-state solution and pushes the cause of peace for both Israel and the Palestinians further out of reach. This resolution makes clear that Congress remains committed to a two-state solution and opposes zero-sum efforts to delegitimize the state of Israel.”

"We must reject the blatant anti-Semitics injected throughout BDS," said Zeldin.

VIDEO SURFACES OF SHOUTING RASHIDA TLAIB BEING DRAGGED OUT OF 2016 TRUMP EVENT

The Associated Press reported that House Majority Leader Steny Hoyer, D-Md., had promised lawmakers the bill would come up for a vote before the August recess in a bid to shield House Democrats from continued Republican efforts to attack them around the issue of Israel. Liberal lawmakers, most notably Omar and Tlaib, both newly elected Muslim-Americans, have spoken out in support of the BDS movement, as they criticize Israel's treatment of Palestinians.

Omar, a member of the Foreign Affairs Committee, was among the only lawmakers to voice objection when the bill was included in a package the panel approved last week.

"What are we doing to bring peace? I believe that simple question should guide every vote we take in this committee," said the freshman lawmaker, who came to the U.S. as a refugee from Somalia when she was a child and became a U.S. citizen.

Omar has been outspoken against Israel, once tweeting that lawmakers were supportive of the Jewish state because they were essentially being paid to do so. It was widely considered a slur that relied on a trope against Jewish people, and she later "unequivocally" apologized.

Trump called her apology "lame" and Republicans have continued to stoke opposition to her views as part of the "squad" of liberal freshmen lawmakers. Trump stood by last week at a campaign rally as the crowd chanted about Omar, "Send her back."

LEE ZELDIN: ILHAN OMAR IS WRONG -- ANTI-ISRAEL AND ANTI-SEMITIC BDS MOVEMENT MUST BE CONDEMNED

Omar said she supports the long-held U.S. goal of a "two-state solution," one for Israel and one for Palestine. But she said during the committee hearing last week that "truly achieving peace" means "ending this occupation" of Israeli settlements.

Zeldin slammed Omar last week for introducing a resolution last week supporting the right to boycott Israel. In remarks supporting her measure, Omar likening the boycott of the Jewish state to boycotts of Nazi Germany and the Soviet Union.

He said that she brought “her hateful twist” by propping up the BDS movement.

“Israel is our best ally in the Mid East; a beacon of hope, freedom & liberty, surrounded by existential threats,” Zeldin wrote in a tweet. “Shame on Rep Omar for bringing her hateful twist on that reality to House Foreign today, propping up the BDS movement & blaming Israel for all of its challenges.”

An earlier version of the resolution passed the Senate with robust bipartisan support earlier this year. But the Senate bill, which was part of a broader foreign policy package, stalled in the House amid concerns over First Amendment rights and the ability of Americans to protest Israel's policies.

CLICK HERE TO GET THE FOX NEWS APP

To win over those in the House who had panned the Senate effort, the resolution beefed up First Amendment protections over the boycott. While the Senate bill affirmed the legal authority of state and local governments to restrict contracts or take other actions against entities that boycott Israel, the House bill affirms the constitutional right of Americans to engage in "free speech, including the right to protest or criticize the policies of the United States or foreign governments."

The resolution has been pushed by AIPAC, the influential Israel lobby in Washington. J Street, a more liberal group, opposed the Senate version but supported the House's approach.

The Associated Press contributed to this report.