The US Senate has confirmed President Donald Trump’s controversial pick to be America’s ambassador to Israel.

David Friedman was approved in a 52-46 vote Thursday that was almost entirely divided along party lines. All but two Senate Democrats – Robert Menendez and Joe Manchin – voted against him.

Friedman, who once served as Trump's bankruptcy lawyer, is critical of the so-called two-state solution to the Israeli-Palestinian conflict and supports Israel’s illegal settlement activities on the occupied territories.

Emboldened by the Trump administration’s support, Israel has given the go-ahead to the construction of many new settlement units.

Over half a million Israelis live in over 230 settlements built illegally since the 1967 occupation of the Palestinian territories.

During the 2016 presidential campaign, Friedman was Trump’s adviser on US-Israel relations.

The 58-year-old has also backed the idea of moving the US embassy from Tel Aviv to East Jerusalem al-Quds.

“I intend to work tirelessly to strengthen the unbreakable bond between our two countries and advance the cause of peace within the region, and look forward to doing this from the US embassy in Israel’s eternal capital, Jerusalem,” he said in a statement following his nomination in December.

The Palestinians want al-Quds as the capital of their promised future state. The intent to move the US embassy there is seen as the recognition of the city as the capital of an Israeli “state.”

Friedman, a son of an Orthodox rabbi with no previous political experience, has previously argued that the pursuit of a Palestinian state is a “damaging anachronism.”

Some 600 American rabbis signed a letter last month against Friedman’s appointment as the US ambassador, taking issue with his incendiary rhetoric.

“An ambassador is charged with representing our entire nation,” they wrote. “We are very concerned that rather than try to represent the US as an advocate for peace, Mr. Friedman will seek to mold American policy in line with his extreme ideology.”

During his confirmation hearing in February, Friedman apologized for his past comments and promised to be "respectful and measured" if confirmed.

Israeli Prime Minister Benjamin Netanyahu has welcomed Friedman's nomination.