The Senate voted 52-42 on Wednesday to advance the nomination of Eric Garcetti to be U.S. ambassador to India, a key test vote that sets up final confirmation later in the day.

The long-delayed Garcetti nomination grew unusually contentious and sparked some last-minute drama. First nominated in July 2021, he had been held up in part over concerns about how he handled sexual misconduct claims against a former aide while he was mayor of Los Angeles. Garcetti has denied wrongdoing.

Several Democrats voted against advancing his nomination, but enough Republicans backed Garcetti to move it forward.

Barring any unexpected twists, a final vote expected Wednesday afternoon would give the U.S. its first permanent ambassador to India under President Joe Biden, more than two years into his term.