Thomas Perez was approved to be the United States’ next Labor secretary by a 54-46 vote in the Senate Thursday. The voted capped months of controversy over Perez during which Senate Republicans sought — but failed — to block his appointment.

Perez, who is currently the Justice Department’s top civil rights enforcer, will take over from Hilda Solis, who stepped down in January. Prior to being at DOJ, he headed Maryland’s Department of Labor, Licensing and Regulation.

A hard-charging liberal activist at DOJ, his nomination was enthusiastically supported by Big Labor. Republican resistance to his nomination was one of the factors leading to the Senate filibuster showdown Tuesday.

He came under fire from Republicans for an unusual quid pro quo deal he struck with the city of St. Paul, Minn. In it, he arranged for the Justice Department to drop a whistleblower case against the city in exchange for the city dropping a potential Supreme Court case.

The Supreme Court case could have limited the use of the legal theory of “disparate impact,” which sets a much lower bar for proving discrimination cases. Perez is an advocate of the theory, which says intent does not need to be proven in discrimination cases.

A report by the House Oversight and Government Reform Committee alleged that Perez sought to hide details of the deal from others in the federal government. Perez refused to comply with a bipartisan subpoena from the committee  related to the case.

Big Labor pushed Democrats hard to end to end the filibuster to allow Perez and others — most notably, the nominees to the National Labor Relations Board — to get Senate votes.

Democrats sought to counter the Republicans’ characterization of Perez as a liberal radical by citing endorsements from Maryland business groups. Those endorsements were secretly arranged by Scott Jensen, a friend and former special assistant to Perez at Maryland’s DLLR. Jensen is now the department’s deputy secretary.

The GOP relented on Perez late last week. Senate Minority Leader Mitch McConnell, R-Ky., conceded they lacked the 60 votes necessary to block debate on him, paving the way for today’s vote.