Retired four-star Army general Lloyd Austin became the first African American defense secretary on Friday, shattering a racial barrier for the nation at a time when the military is assessing possible extremism in its ranks after the Capitol riot and reshaping the force to counter China.

The Senate confirmed Austin in a 93-to-2 vote, giving the incoming Pentagon boss a near-unanimous bipartisan congressional mandate as he sets about overseeing the 2.9 million service members and civilians around the world who fall under the umbrella of the Defense Department.

“It’s an honor and a privilege to serve as our country’s 28th Secretary of Defense, and I’m especially proud to be the first African American to hold the position,” Austin said in a statement on Twitter after his confirmation. “Let’s get to work.”

President-elect Joe Biden on Dec. 9 nominated retired Army Gen. Lloyd J. Austin III to become his defense secretary. Here's what you should know about him. (The Washington Post)

Austin faces the task of accelerating and expanding the Defense Department’s involvement in the distribution of coronavirus vaccines. He also must restore alliances that frayed during President Donald Trump’s tenure, make hard choices in the Pentagon budget to compete with a rising Chinese military and deal with questions about possible internal threats.

Austin, 67, is likely to also face the task of fully winding down the U.S. military presence in Afghanistan and Iraq, a goal that President Biden’s two predecessors campaigned on but failed to achieve.

For Austin to be confirmed, the House and Senate first had to pass a waiver exempting him from a law that requires defense secretaries to be out of uniform for seven years before occupying the top civilian post at the Pentagon. Austin retired in 2016; Congress granted him the waiver Thursday.

Gen. Lloyd J. Austin III told lawmakers during his confirmation hearing that the Defense Department’s job is to keep America safe. (The Washington Post)

Austin’s confirmation caps a career in which the Thomasville, Ga., native and U.S. Military Academy graduate has notched a number of firsts, becoming the first African American to command an infantry division in combat and the first African American to lead U.S. Central Command, the unit of the U.S. military responsible for operations in the Middle East.

An African American first ascended to the uniformed military’s top post in 1989, when Colin L. Powell became the 12th chairman of the Joint Chiefs of Staff. It would take more than 31 additional years for an African American to be chosen as the Pentagon’s top civilian leader, a lag that Austin described as troublesome in video comments before his confirmation.

“It’s hard to believe, but it’s true,” Austin said. “There is kind of a sad commentary here, and that is, it shouldn’t have taken us this long to get here. There should have been someone that preceded me.”

While Austin’s arrival in the Pentagon’s top civilian post breaks down a racial barrier, ­African Americans remain underrepresented in the highest-level officer positions in the armed forces. Austin has said that he hopes to set conditions so other Black officers can be put in the leadership roles he held during his military career, and that he wants to ensure that while he may be the first Black defense secretary, he will not be the last.

Many former national security officials in Washington had been expecting Biden to break a different barrier in his defense secretary nomination by choosing Michèle Flournoy, a former Pentagon policy chief, to be the first woman to hold the post. But Biden developed a personal relationship with Austin while the general commanded U.S. forces in Iraq during the Obama administration. Biden’s late son, Beau, served on Austin’s staff while deployed to Iraq.

Biden signed the law granting Austin an exclusion Friday and described his defense secretary’s confirmation as historic in a message on Twitter. “I look forward to working with him to lead our military, revitalize our alliances, and ensure the safety of the American people,” Biden said, describing Austin as the right person to lead the Defense Department at this moment.

Where more-swashbuckling Army generals such as David H. Petraeus and Stanley McChrystal became political forces in their own right amid the conflicts in Iraq and Afghanistan, Austin cut the opposite profile, remaining private and unusually reserved for a four-star general — an understated style he is likely to maintain in the role of defense secretary.

John Hamre, a former deputy defense secretary who now runs the Center for Strategic and International Studies, said the two foundational decisions that have been shaping the Defense Department in recent years — the pivot to Asia started by President Barack Obama and the national security strategy outlined by Trump defense secretary Jim Mattis identifying China as the U.S. military’s primary focus — are likely to stay the same under Biden.

“So the things that shape defense budgets are not going to change in significant ways,” Hamre said.

Austin arrived at the Pentagon for his first day of work midday Friday after the confirmation vote and, after being sworn in, received an intelligence briefing from department leaders. He then met with David Norquist, the deputy defense secretary appointed by Trump, and the chairman of the Joint Chiefs, Gen. Mark A. Milley. Austin chaired a coronavirus briefing attended by Norquist, Milley and other top Pentagon leaders and spoke by phone with NATO Secretary General Jens Stoltenberg before receiving operational briefings about China and the Middle East later in the day.

After Austin arrived at the Pentagon, he received a call from Biden, who congratulated him on his swift confirmation and thanked him for agreeing to serve the country again, according to a statement from Pentagon press secretary John Kirby.

“Secretary Austin expressed his gratitude to the President for his trust and confidence and for his support during the confirmation process,” Kirby said.

Biden has said he spent countless hours with Austin in the Situation Room during the Obama administration and also saw the personal side of the general, who attended Catholic services along with Biden’s son Beau every week while on deployment.

In an email message to the force, sent upon arriving at the Pentagon, Austin said his job is to make U.S. service members more effective at their own jobs.

“That means ensuring you have the tools, technology, weapons, and training to deter and defeat our enemies,” he said. “It means establishing sound policy and strategy and assigning you clear missions. It means putting a premium on cooperation with our allies and partners. And it means living up to our core values, the same ones our fellow citizens expect of us.”

Austin has made it clear that his first priority as defense secretary is to bring all of the Pentagon’s resources to bear on the administration’s effort to combat the coronavirus and speed up the distribution and delivery of vaccine.

In his message to the force, Austin said the military can expect to continue aiding the nation’s health-care professionals in the fight to end the pandemic.

“But we must help the Federal Government move further and faster to eradicate the devastating effects of the coronavirus,” Austin wrote. “To that end, we will also do everything we can to vaccinate and care for our workforce and to look for meaningful ways to alleviate the pressure this pandemic has exerted on you and your families.”

Austin faces the challenge of restoring critical military alliances that Trump strained while in office, despite the best efforts of his Pentagon leaders to nurture the decades-old bonds with nations in Europe and Asia. The secretary must also see through Biden’s plans to undo Trump’s restrictions on transgender troops and probably to walk back Trump’s orders to draw down a large swath of U.S. forces stationed in Germany. He will also be tasked with improving the military’s handling of sexual assault within its ranks, an issue that despite attention from senior leaders has continued to pose significant problems for the force.

Austin will need to chart a course for the future of the U.S. military and the nation’s $750 billion national defense budget as China develops increasingly sophisticated technology and threatens to eclipse the might of an American force that has held undisputed dominance for decades.

Because he served on the board of the defense contractor Raytheon after retiring, Austin has agreed to recuse himself from Pentagon matters regarding the company for the next four years. He was still listed as a board member Friday, but the company is expected to post a notification announcing his resignation in the coming days. According to his confirmation disclosure, Austin will divest from Raytheon within 90 days of his confirmation.

During his confirmation hearing Tuesday, Austin pledged to root out any extremism in the force. He also promised to respect the tenet of civilian control over the U.S. military enshrined in the Constitution, by surrounding himself with civilian appointees and including them in critical decisions, rather than relying on uniformed service members or a cadre of retired officers.

Sens. Mike Lee (R-Utah) and Josh Hawley (R-Mo.) were the lawmakers who voted against Austin’s nomination Friday.

A far larger contingent of senators, however, voted against giving Austin a waiver, citing concerns about eroding the tenet of civilian control over the military. Austin is the second defense secretary in just over four years to receive a waiver, after Mattis, a retired Marine Corps general and Trump’s first nominee for the position, was granted an exception to the law.

On Thursday, the House approved Austin’s waiver first, by a vote of 326 to 78. The Senate followed suit about an hour later, backing the waiver by a vote of 69 to 27.

Before the confirmations of Austin and Mattis, only one individual had ever received such a waiver: George C. Marshall Jr., who was granted an exception by Congress to serve as Harry S. Truman’s defense secretary from 1950 to 1951.

Aaron Gregg contributed to this report.