Some of the top congressional Democrats blasting President Trump’s decision to recognize Jerusalem as the capital of Israel and move the U.S. Embassy there have in fact supported that very position in the past.

Sen. Dianne Feinstein, D-Calif., penned a letter to the president last week, urging him not to move the embassy. Feinstein’s letter said the move would “spark violence, further alienate the United States and undermine the prospects of a two-state solution.”

“The future of Jerusalem is an issue that should be decided by Israel and the Palestinians, not unilaterally by the United States,” Feinstein wrote.

But Feinstein was among those who voted for a 1995 law passed by Congress that required “the relocation of the United States embassy in Israel to Jerusalem.” The measure also required the U.S. recognize the city as the capital of Israel.

That law, the Jerusalem Embassy Act, passed the Senate by a 93-5 margin. But it has never been implemented due to a loophole that allowed successive presidents – Bill Clinton, George W. Bush and Barack Obama – the option to issue waivers every six months to delay the embassy move.

Trump also took advantage of the loophole, in June, drawing praise from Arab allies and Palestinians, and some disappointment from Israel. And administration officials said the president will still sign another waiver to keep from jeopardizing State Department funding while the relocation process from Tel Aviv to Jerusalem begins.

Feinstein’s office did not immediately respond to Fox News’ request for comment on her change in position. But she is hardly alone.

Sen. Bernie Sanders, I-Vt., who caucuses with Senate Democrats, slammed Trump's decision as well.

"There’s a reason why all past US administrations have not made this move, and why leaders around the world have warned Trump against it: It would undermine the prospects for an Israeli-Palestinian peace agreement and severely, perhaps irreparably, damage our ability to broker it," Sanders posted on Twitter.

But Sanders supported a resolution in June titled "A resolution commemorating the 50th anniversary of the reunification of Jerusalem," which mentions keeping Jerusalem as the "undivided capital of Israel."

The call to recognize Jerusalem as Israel’s capital was also included in the official Democratic Party platforms of 2016 and 2008: “While Jerusalem is a matter for final status negotiations, it should remain the capital of Israel, an undivided city accessible to people of all faiths. Israelis deserve security, recognition, and a normal life free from terror and incitement.”

In 2008, the platform said “Jerusalem is and will remain the capital of Israel. The parties have agreed that Jerusalem is a matter for final status negotiations. It should remain an undivided city accessible to people of all faiths.”

In fact, both the Democratic and Republican party platforms leave room for “final status negotiations,” but generally support the 1995 law.

Not all Democrats are criticizing the president.

Senate Minority Leader Chuck Schumer, D- N.Y., who has proven to be a tough critic of Trump, slammed Trump for his indecisiveness on the issue, but actually supports the move, saying that it would “show the world that the U.S. definitively acknowledges Jerusalem as Israel’s capital.”