The US Senate has approved the appointment of President Donald Trump's former bankruptcy lawyer, a supporter of Israeli settlement building, as Washington's ambassador to Israel.

Trump's nomination of David Friedman had raised concerns about America's commitment to a two-state Middle East peace deal.

But Friedman apologised to politicians for his past harsh language at a confirmation hearing last month, and the Senate approved him on Thursday by a margin of 52 to 46.

Two of the chamber's 52 Republicans did not vote and two of the 48 Democrats voted against their camp to approve Friedman.

READ MORE: David Friedman - 'Great advantage to Netanyahu'

Trump's administration has been slow to appoint new ambassadors to replace those who stepped down at the end of former president Barack Obama's term, and more than 70 posts lie open.

But the Israel job was seen as a key bellwether of the new administration's attitude to the Israeli-Palestinian conflict, and Friedman's nomination was welcomed by the Israeli right.

Israeli Prime Minister Benjamin Netanyahu declared on Twitter that Friedman "will be warmly welcomed as President Trump's representative and as a close friend of Israel".

An Orthodox Jew and the son of a New York rabbi, Friedman is a bankruptcy lawyer who has worked on Trump's behalf for the past 15 years. He joined the presidential election campaign last year as Trump's adviser on Israel.

Before becoming the ambassadorial nominee, Friedman was known as a vocal supporter of Israeli causes, including the building of illegal settlements on Palestinian land in Jerusalem and the occupied West Bank.

Israeli daily Haaretz revealed recently that he was a donor to the American branch of Ateret Cohanim, a far-right Israeli group that settles Jews in key locations in East Jerusalem, and especially around al-Aqsa, the most sensitive Islamic site in the region.

He is also the president of American Friends of Bet El Institutions, which raises millions of dollars each year for a settlement close to the Palestinian city of Ramallah.

He has clashed with American Jewish progressive groups, notably dubbing liberals "worse than kapos," a reference to Jewish collaborators who worked as guards in Nazi prison camps.

He has also dismissed the two-state solution - the vision of an end to the conflict in which Israel and a future Palestine live side-by-side within agreed borders.

Trump's administration insists it might support this idea if Israel comes to a deal, but has clearly softened the Obama administration's tough criticism of Israeli settlements.

Democratic senator Dianne Feinstein voted against Friedman and dubbed him "too divisive to serve in one of our nation's most sensitive diplomatic positions".

And liberal Jewish lobby group J Street said it was "heartened" that the level of opposition to Friedman's confirmation showed that his views were outside the US mainstream.

But the Republican Jewish Coalition welcomed the vote, arguing "there is no question that the relationship between the US and Israel will grow stronger".