WASHINGTON (Reuters) - The U.S. Senate voted overwhelmingly on Thursday to confirm former Republican senator Dan Coats to be President Donald Trump’s director of national intelligence and to approve Army Lieutenant General H.R. McMaster’s transfer to become his national security adviser.

Slideshow ( 2 images )

The vote was 85-12 to confirm Coats, who also served as ambassador to Germany under former President George W. Bush. Fifty-one votes were required for confirmation.

The only Republican who voted against Coats was Senator Rand Paul, one of the Senate’s leading privacy advocates, as are several of the Democrats who also voted against Coats.

Democratic Senator Ron Wyden had said he would object to Coats’ nomination because he felt the office of the Director of National Intelligence had not provided the committee with enough information about how many Americans’ communication records had been subjected to government surveillance.

McMaster was approved as Trump’s second national security adviser in an 86-10 vote. No Republican senator voted against him.

McMaster had faced some opposition from Democratic senators who cited concerns about his past decision to allow two service members accused of assault to advance their careers while the case against them was open, in violation of Army regulations.

The Senate does not normally approve a president’s national security adviser but McMaster’s reappointment to his new position had to be considered by the Senate because he is an active-duty military officer.

McMaster, 54, who is known for speaking his mind and challenging his superiors, replaces retired Lieutenant General Michael Flynn, who was fired as national security adviser on Feb. 13 after reports emerged that he had misled Vice President Mike Pence about speaking to Russia’s ambassador to the United States about U.S. sanctions before Trump took office.

Coats, 73, replaces James Clapper, who retired as President Barack Obama left office in January.

Coats was a member of the Senate’s intelligence committee until he retired from the Senate at the end of last year. He pledged during his confirmation hearing on Feb. 28 to support a thorough investigation of any Russian effort to influence the 2016 presidential election.