mattis confirmation hearing 2
mattis confirmation hearing 2
PHOTO: CNN
Now playing
01:31
Mattis: Trump is open to NATO conversation
President Donald Trump addresses the 73rd session of the United Nations General Assembly, at U.N. headquarters, Tuesday, Sept. 25, 2018. (AP Photo/Richard Drew)
President Donald Trump addresses the 73rd session of the United Nations General Assembly, at U.N. headquarters, Tuesday, Sept. 25, 2018. (AP Photo/Richard Drew)
PHOTO: Richard Drew/AP
Now playing
02:17
Trump claim to world leaders met with laughter
PHOTO: CNNMoney
Now playing
06:22
How Trump's tweet sparked #WhyIDidntReport
President Donald Trump points to the crowd after speaking to law enforcement officials on the street gang MS-13, Friday, July 28, 2017, in Brentwood, N.Y.
President Donald Trump points to the crowd after speaking to law enforcement officials on the street gang MS-13, Friday, July 28, 2017, in Brentwood, N.Y.
PHOTO: Evan Vucci/AP
Now playing
01:46
Trump's I'm-joking-but-not-really strategy
WASHINGTON, DC - DECEMBER 15:  U.S. President Donald Trump listens to a question as he speaks to members of the White House Press Corps prior to his Marine One departure from the South Lawn of the White House December 15, 2017 in Washington, DC. (Alex Wong/Getty Images)
WASHINGTON, DC - DECEMBER 15: U.S. President Donald Trump listens to a question as he speaks to members of the White House Press Corps prior to his Marine One departure from the South Lawn of the White House December 15, 2017 in Washington, DC. (Alex Wong/Getty Images)
PHOTO: Alex Wong/Getty Images
Now playing
01:20
Trump often says he's 'the least racist person'
PHOTO: CNN
Now playing
01:00
Trump on Manafort: I feel sad about that
PHOTO: Pool
Now playing
01:22
Trump on Cordray: He was groomed by 'Pocahontas'
Now playing
05:58
Baldwin: This face behind Trump startled me
PHOTO: CNN
Now playing
02:01
Trump responds to op-ed: 'Gutless'
PHOTO: CNN Illustration/Getty Images
Now playing
03:18
Why Woodward's book matters
PHOTO: CNN
Now playing
01:13
Dean: Trump acts 'frighteningly dictatorial'
WASHINGTON, DC - MAY 08:  U.S. President Donald Trump announces his decision to withdraw the United States from the 2015 Iran nuclear deal in the Diplomatic Room at the White House May 8, 2018 in Washington, DC. After two and a half years of negotiations, Iran agreed in 2015 to end its nuclear program in exchange for Western countries, including the United States, lifting decades of economic sanctions. Since then international inspectors have not found any violations of the terms by Iran.  (Photo by Chip Somodevilla/Getty Images)
WASHINGTON, DC - MAY 08: U.S. President Donald Trump announces his decision to withdraw the United States from the 2015 Iran nuclear deal in the Diplomatic Room at the White House May 8, 2018 in Washington, DC. After two and a half years of negotiations, Iran agreed in 2015 to end its nuclear program in exchange for Western countries, including the United States, lifting decades of economic sanctions. Since then international inspectors have not found any violations of the terms by Iran. (Photo by Chip Somodevilla/Getty Images)
PHOTO: Chip Somodevilla/Getty Images North America/Getty Images
Now playing
02:31
Woodward book reveals 'crazytown' White House
PHOTO: CNN Illustration/Getty Images
Now playing
03:03
Trump's latest Twitter tirade lashes at media
TOPSHOT - US President Donald Trump waits to speak during a memorial service at the Pentagon for the 9/11 terrorist attacks  September 11, 2017 in Washington, DC. / AFP PHOTO / Brendan Smialowski        (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)
TOPSHOT - US President Donald Trump waits to speak during a memorial service at the Pentagon for the 9/11 terrorist attacks September 11, 2017 in Washington, DC. / AFP PHOTO / Brendan Smialowski (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)
PHOTO: Brendan Smialowski/AFP/Getty Images
Now playing
01:57
Trump warns of violence if GOP loses midterms
PHOTO: Photo Illustration: Getty Images/CNN Business
Now playing
01:40
Trump: Impeach somebody who's done great job?
PHOTO: Fox News Channel
Now playing
01:19
Trump on Sessions: What kind of man is this?

Story highlights

The Senate approved the waiver easily on Thursday

Mattis had a low-key confirmation hearing

(CNN) —  

Donald Trump’s nominee for defense secretary cleared an important legal hurdle on Friday as the House voted largely along party lines to grant him a special exemption from a key law that had been standing in his way.

The House voted 268-151 in favor of giving Ret. Gen. James Mattis the needed waiver. The Senate voted overwhelmingly in favor of doing so on Thursday, after Mattis’ confirmation hearing.

President Barack Obama is expected to sign the waiver soon, a move that helps clear the way for installing one of the top members of his successor’s national security team.

Senate Republicans are aiming to vote on Mattis’ confirmation to lead the Pentagon on January 20, the day President-elect Donald Trump is sworn in as president.

Law dictates that any military official must wait seven years from leaving the service before serving as defense secretary, a civilian position. Mattis retired in 2013, meaning he could not be secretary of defense unless Congress passed a special exception.

RELATED: Mattis emerges with strong support

The law is designed to underscore the importance of civilian control over the military, a principle lawmakers said they did not take waiving lightly.

A waiver had only been granted only once before, to George Marshall under then-President Harry Truman.

The vote in the House was more contentious than the one in the Senate. Democrats on the House Armed Services Committee objected to Mattis abruptly canceling testimony scheduled for Thursday and repeatedly voiced their concern about voting without talking to Mattis during debate in the committee about moving the waiver forward.

In the Senate, Mattis faced a low-key confirmation hearing before the Senate Armed Services Committee, where many Democrats expressed hope that the former US Central Command chief and former NATO supreme allied commander could serve as a check on the President-elect in use of force and military decision-making.

Mattis’ confirmation next week is expected given Republicans’ majority and the overwhelmingly bipartisan 81-17 Senate vote in favor of the waiver on Thursday.