Sen. John McCain voted for President Trump's pick to lead of the Office of Management and Budget in committee on Thursday, despite the reservations he has about the nominee's past votes in favor of trimming military spending.

The Senate Committee on Homeland Security and Governmental Affairs approved the nomination of Rep. Mick Mulvaney, R-S.C., by an 8-7 party-line vote.

McCain, R-Ariz., who complained about Mulvaney's support for military spending cuts in his confirmation hearing, voted for him in the committee, but said he was still undecided if he would support him in the full Senate.

"I believe the full Senate should have the opportunity to consider Congressman Mulvaney's nomination to be director of the Office of Management and Budget," McCain said in a statement. "President Trump has correctly stated that repealing the defense sequester and rebuilding our military are top priorities. Given Congressman Mulvaney's record on defense spending, I continue to have concerns about his nomination to be OMB Director."

Several Democrats said they opposed Mulvaney's nomination because of his involvement in the government shutdown, as well as his stances on Medicare and Social Security.

"I do not think that Congressman Mulvaney is the right one to be doing the difficult job of finding compromise and consensus in a divided Washington, how we move forward on the budget," said Sen. Claire McCaskill, D-Mo.

Mulvaney will have a second committee vote later on Thursday in the Senate Budget Committee before getting a confirmation vote in the full Senate.