The Senate on Thursday confirmed Steven Menashi to a seat on the U.S. Court of Appeals for the Second Circuit, bringing an end to a confirmation battle that at times drew ire from members of both parties toward the judicial nominee.

The Senate confirmed Menashi 51 to 41, largely along party lines. Sen. Susan Collins, R-Maine, broke with her party to vote against the nominee. Menashi’s confirmation flips the Second Circuit to a majority of Republican appointees.