Washington: The Senate on Wednesday (Local Time) confirmed the former mayor of Los Angeles, Eris Garcetti, to be the US ambassador to India and ending the two-year wait.

Garcetti won the mandate by a vote of 52 to 42, a major victory for US President Joe Biden as well, who stuck by his political ally in the face of the allegations and the prolonged process that has left the world's most populous democracies without US representatives.

After the result, Garcetti said in a statement, "I'm thrilled with today's outcome, which was a decisive and bipartisan decision to fill a critical post that has been vacant for far too long. Now the hard work begins."

"I'm deeply grateful to President Biden and the White House for the confidence and support throughout this process, and to all Senators on both sides of the aisle - whether they voted for me or not - for their thoughtful consideration. I'm ready and eager to begin my service representing our critical interests in India," he added.

Earlier, the Senate voted 52-42 giving the advantage to the former Los Angeles mayor's nomination that caps off months of limbo for Garcetti.

Senate Foreign Relations Committee also voted in favour of the former Los Angeles Mayor to become the ambassador of India. The panel approved the nomination by a vote of 13-8, with Republican Senators Todd Young and Bill Hagerty joining all of the committee's Democrats in voting in favour of Garcetti.

US President Joe Biden first nominated Garcetti to become ambassador to India in July 2021, and the Foreign Relations Committee initially signed off on him in January 2022.

But his nomination has been in limbo for a year following allegations that Garcetti knew about sexual misconduct that one of his former top advisers committed and did not take any action to stop it, reported The Hill.

Senator Chuck Grassley released a report on the situation in May, concluding that Garcetti was likely aware of the allegations that his former chief of staff, Rick Jacobs, sexually harassed a Los Angeles police officer.

Grassley's office said in a release that the investigation's findings contradict what Garcetti testified at a nomination hearing before the committee.

Garcetti said at the time that in response to the report, he "strongly" disagreed with its findings and expressed optimism about being confirmed by the full Senate, reported The Hill.

A report that the city of Los Angeles commissioned had previously found that Garcetti had not engaged in any improper conduct in relation to the allegations against Jacobs.

Garcetti never received a full vote of the Senate before the end of the congressional session in January, and Biden re-nominated him immediately at the start of the current session, reported Fox News.