President Donald Trump has picked Army Lt. Gen. H.R. McMaster to be his new national security adviser.

Keith Kellogg had been doing the job since Mike Flynn resigned late last Monday. He will slide into the role of McMaster's chief of staff, the president announced this afternoon.

McMaster is currently a director at the U.S. Army Training and Doctrine Command. His new job will entail being Trump's in-house national security expert. He will stay on active duty, the White House confirmed.

'He’s a man of tremendous talent and tremendous experience,' Trump said of McMaster in an impromptu statement from his Palm Beach estate, Mar-a-Lago. 'He is highly respected by everybody in the military, and we’re very honored to have him.'

Trump met with four candidates for the position over the weekend: former U.S. Ambassador to the U.N. John Bolton, McMaster, Kellogg and Lieutenant General Robert Caslen.

Scroll down for video

President Donald Trump has picked Army Lt. Gen. H.R. McMaster to be his new national security advisor

'He’s a man of tremendous talent and tremendous experience,' Trump said of McMaster in an impromptu statement from his Palm Beach estate. 'He is highly respected by everybody in the military and we’re very honored to have him'

Keith Kellog (right) had doing the job since since Mike Flynn resigned late last Monday and will be national security council chief of staff

President Donald Trump made his national security adviser pick Twitter official after announcing his name at Mar-a-Lago Monday afternoon

The White House said yesterday that Trump planned to meet with some of them again today.

Trump himself had said on Friday that Kellogg was 'very much in play.' So were 'three others,' the president said but did not name.

Former CIA Director David Petraeus was floated as a candidate for the position, but the Wall Street Journal reported that he took himself out of the running.

White House Press Secretary Sean Spicer confirmed to reporters who went with the president to Mar-a-Lago that Petraeus was no longer under consideration.

Trump asked for Flynn's resignation last Monday after the retired retired army general lost his trust, with the intention of giving the national security job to Robert Harward, a retired U.S. Navy vice admiral.

But Harward turned Trump down, saying in a statement that he couldn't commit to the 24/7 nature of the job. He cited 'financial and family issues' as his other reasons.

Sources familiar with the talks told CNN that chaos at the White House and conflict over the level of authority he would have had kept him from saying yes.

White House chief of staff Reince Priebus disputed those reports on Friday morning. He said on Fox and Friends that Harward's 'family...couldn't go for it.'

Trump himself had said on Friday that Kellogg was 'very much in play.' So were 'three others,' the president said but did not name

White House chief of staff Reince Priebus said Friday that Trump's first choice to replace Flynn, Robert Harward, turned down the job because his 'family...couldn't go for it'

Trump was said to be looking at former CIA Director David Petraeus (left) but he took himself out of the running. The White House says Trump interviewed former U.N. Ambassador John Bolton

Harward, 60, is married and has two adult children, ages 31 and 24, according to public records.

His thanks, but no thanks, to the National Security Council gig left the Trump administration in limbo after Flynn's untimely departure.

The White House had been talking to Harward for days before Flynn was fired, and Trump suggested Thursday that his plans to hire the former deputy commander of U.S. Central Command made it easier for him to dismiss his incumbent national security adviser.

Trump settled on McMaster Monday, saying in his Mar-a-Lago remarks that he believes McMaster and Kellogg, whom he called a 'terrific man' will make a great team.

'They will be working together. And Keith is going to be chief of staff. And I think that combination is something very, very special,' Trump said.

McMaster told Trump he was 'grateful' for the opportunity and shook hands with the president.

Kellogg also thanked Trump for allowing him to continue to serve. 'I'm very honored by it, very privileged by it,' he said. 'And I'm very honored and privileged to serve alongside H.R. McMaster, I've known him for years as well. He's a great statesmen, a great soldier.'

The president said he met with 'many other people' about the position that he has 'tremendous respect for,' including Bolton, who he said he was considering for something else.

'We’ll be asking him to work with us in a somewhat different capacity,' Trump said. 'John is a terrific guy. We had some really good meetings with him. Knows a lot. He had a good number of ideas that I must tell you I agree very much with.'

Of Kellogg and McMaster, he said, 'What a team. This is a great team. We're very, very honored. Our country is lucky to have two people like this and frankly, after having met so many of the people in the military, we're lucky to have all of them.

'So thank you all very much. I'll see you back in Washington. We're leaving now.'

Trump answered only question as he left, on Vice President Mike Pence. He said he was consulted about the decision.

Robert Harward said in a statement that he turned down President Trump's offer to serve as his national security advisor because he couldn't commit to the 24/7 nature of the job. He cited 'financial and family issues' as his other reasons

Retired Gen. Michael Flynn resigned the post last Monday night following accusations that he had lied about pre-inauguration contacts with Russia's ambassador

The Financial Times reported Thursday afternoon that Harward was offered the job and said no. Citing two unnamed sources, the newspaper published a story describing Trump in crisis mode.

'Harward is conflicted between the call of duty and the obvious dysfunctionality,' said one of FT's well placed sources about the George W. Bush-era National Security Council veteran who is now a Lockheed Martin executive.

He confirmed that he'd walked away from the offer later, saying in a statement: 'Since retiring, I have the opportunity to address financial and family issues that would have been challenging in this position.

'Like all service members understand, and live, this job requires 24 hours a day, 7 days a week focus and commitment to do it right. I currently could not make that commitment.'

On Fox and Friends Priebus zeroed in on Harward's family as the reason for his refusal in the face of reports that suggested otherwise.

'We told Admiral Harward was that we were very interested in talking to him, and we were very interested and serious about his position at the NSA, and he responded, and said, "Well, let me talk to my wife and family, and we'll get back to you." And we kept in constant contact with him.

'He called us and said, 'Guess what? I've got some support in the family but others aren't that excited about it.' And he then told us that it was something that his family...couldn't go for,' Priebus said.

The White House official insisted that Harward's rejection was a 'reasonable thing.'

'The conversations were happening based on a contingency that his family would sign off on him going further and the family didn't sign off. That's all it is.'

The president said during a Thursday afternoon press conference that the existence of an 'outstanding' candidate to replace Flynn had made it easier to see him go.

That candidate, it seems, wasn't consulted.

Harward's thanks, but no thanks, to the National Security Council gig left the Trump administration in limbo after Flynn's untimely departure

Harward was reportedly concerned about reports that many of Flynn's deputies have been told they will keep their jobs despite the disgraced general's departure.

National security advisers typically are permitted to pick their own teams.

A friend of Harward's told CNN the retired admiral described the White House's offer as a 's*** sandwich.' The network said a senior Republican said it was 'a question of clarity regarding the lines of authority.'

However, White House spokeswoman Sarah Huckabee Sanders says that Trump gave 'full authority for McMaster to hire whatever staff he sees fit.'

Trump had bristled on Thursday at the idea that his administration hasn't yet found its stride. It's 'running like a fine-tuned machine,' he claimed at his news conference, 'despite the fact that I cannot get my cabinet approved.'

'I turn on the TV, open the newspapers – and I see stories of chaos, chaos,' Trump complained in his first solo press conference since taking over the Oval Office. 'Yet it is the exact opposite.'

Flynn had resigned three days before after revelations that he had discussed U.S. sanctions on Russia with the Russian ambassador to the United States before Trump took office.

Losing his national security adviser so soon after taking office was an embarrassment for the new Republican president, who has made national security a top priority, and he worked quickly to find a permanent replacement.

McMaster is on active duty, which means, according to CNN's Barbara Starr, that he couldn't turn down the president's request, which would have further rattled the White House.

He's considered one of the Army's leading intellectuals, says the New York Times, pointing to McMaster's track record of critiquing the Joint Chiefs of Staff's performance during the Vietnam War and the Bush administration's follies in Iraq.

The new national security advisor also helped devise the counterterrorism strategy in Iraq that Petraeus eventually adopted. It helped the United States change its fortunes in the war, which it looked to be losing.

Trump pondered this decision during a long weekend in Florida at his Mar-a-Lago estate.

He played golf and held meetings at what has been deemed the winter White House. He was headed back to Washington on Monday evening.

Before he left he said in a tweet, 'Meeting with Generals at Mar-a-Lago in Florida. Very interesting!'

He's since deleted that message.