Kevin Lamarque / Reuters Eric Fanning smiles as he testifies before a Senate Armed Services Committee confirmation hearing on his nomination to be be secretary of the Army on Capitol Hill in Washington on Jan. 21.

WASHINGTON -- The Senate on Tuesday confirmed Eric Fanning as the new secretary of the Army -- quietly making history by putting the first openly gay person in the post.

Fanning was confirmed unanimously on a voice vote. He previously filled a number of senior positions in the Department of Defense, including acting undersecretary of the Army, special assistant to Defense Secretary Ashton Carter and undersecretary of the Air Force.

President Barack Obama nominated Fanning in September, but his confirmation was delayed because of politics. Sen. Pat Roberts (R-Kan.) put a hold on his nomination in November over his opposition to Obama’s push to close the prison at Guantanamo Bay, Cuba, and transfer prisoners to facilities in the United States. In the meantime, Sen. John McCain (R-Ariz.), who chairs the Armed Services Committee, refused to give Fanning a hearing because he was irked that Fanning was serving as acting Army secretary while his confirmation was pending.

The Pentagon alleviated McCain's concerns in January by reassigning Fanning to a staff position. On Tuesday, Roberts said he has gotten the "assurances I need" about Guantanamo and was ready to release his hold on Fanning.

The Kansas senator said he personally called Fanning earlier in the day to tell him he was planning to let him through.

"My issue has never been with Mr. Fanning's character, his courage or his capability," Roberts said on the Senate floor. "He will be a tremendous leader."

Gay rights groups celebrated the news.

"Eric’s sexual orientation has absolutely no bearing on his ability to do this job; nor was it the reason for his nomination," said Matt Thorn of OutServe-SLDN, which advocates for LGBT military personnel. "But this milestone of having an openly gay individual in this high level position within the Department of Defense will help to continue to set a tone of understanding and respect for the LGBT community throughout the armed services."