WASHINGTON -- The Senate voted Wednesday to allow Army Lt. Gen. H.R. McMaster to stay on active duty and retain his three stars as national security adviser.

The vote was 86-10 with opposition from some Democrats and cleared away a technical hurdle for McMaster as he joins the White House as a top adviser to President Donald Trump. The Senate was required by law to reappoint the widely respected general before he could serve in his new position.

McMaster was tapped by Trump last month after the former national security adviser, retired Army Lt. Gen. Mike Flynn, resigned over misleading statements about his contacts with Russia before the inauguration.

"He is experienced, he is talented, he knows what it's like to be in combat with the enemy, and I believe he is badly needed in this position," said Sen. John McCain, R-Ariz., chairman of the Senate Armed Services Committee.

The committee overwhelmingly approved McMaster's status earlier this month, making him the first national security adviser to remain on active duty at the general rank since Colin Powell served in the administration of former President Ronald Reagan.

Sen. Claire McCaskill, D-Mo., a member of the Armed Services Committee, was among the Democrats who voted against the approval Wednesday and abstained from the earlier committee vote. She said she wanted more information on McMaster's history of handling sexual assault cases and a rebuke that he received over his handling of a sexual assault investigation involving two officers while a commander at Fort Benning, Ga.

McMaster, who won the early support of lawmakers such as McCain and Sen. Tom Cotton, R-Ark., last served as director of the Army Capabilities Integration Center in Virginia and won a Silver Star as a commander during the Battle of 73 Easting, a major tank battle during the Gulf War.

He is known for his military intellect and his independence -- he helped craft U.S. counterinsurgency strategies during the Iraq War -- as well as his book Dereliction of Duty, which harshly criticized the handling of the Vietnam War.

McMaster could now play a key role in formulating Trump and his White House team's national security strategy, though it remains uncertain how heavily it will affect the new and tradition-bucking administration.

Last month, the general had advised against the White House using the term "radical Islamic terrorism" because it could be counterproductive to its efforts to combat terrorism. Trump, who during his campaign often ridiculed the reluctance of others to use the term, instead chose to repeat it during a joint address to Congress.