Updated

The Senate on Thursday narrowly confirmed Rep. Mick Mulvaney to head up the White House Office of Management and Budget.

He was confirmed on a 51-49 vote.

Mulvaney, a conservative Republican from South Carolina, faced opposition from Senate Armed Services Committee Chairman John McCain. McCain, R-Ariz., took issue with Mulvaney’s past support of defense cuts as well as his 2011 vote to withdraw all U.S. troops from Afghanistan.

McCain's objections added to a growing level of bipartisan angst over some of President Trump's Cabinet nominees.

On Wednesday, fast-food chain CEO Andrew Puzder withdrew from consideration for Labor secretary following controversy over his personal and professional past. About a dozen Republican senators had voiced reservations about the nominee. The Puzder news came on the heels of Trump’s national security adviser Michael Flynn resigning amid controversy over his past contact with the Russian ambassador.

The Senate on Wednesday had voted 52-48 along party lines to advance Mulvaney to a final vote Thursday. McCain voted to advance Mulvaney, though he made his opposition clear from the Senate floor.

“I will vote to oppose Congressman Mulvaney’s nomination because it would be irresponsible to place the future of the defense budget in the hands of a person with such a record and judgment on national security,” McCain said.

Appropriations Committee Chairman Thad Cochran of Mississippi also expressed reservations about Mulvaney, though he voted for him Thursday.

The White House Office of Management and Budget is one of the most powerful agencies in the federal government. As its head, Mulvaney will assist the president in preparing the annual federal budget. OMB examiners provide guidance to government agencies on how to prepare their budgets.

Immediately following the Mulvaney vote, the Senate will turn its attention to Environmental Protection Agency nominee Scott Pruitt.

The conservative Oklahoma attorney general is expected to easily clear a procedural vote but there is already pushback from some Republicans on his actual confirmation vote.