Washington (CNN) Mick Mulvaney will become the acting White House chief of staff at the end of the year, President Donald Trump announced in a tweet on Friday.

Mulvaney will not resign as director of the Office of Management and Budget while he is acting White House chief of staff, White House press secretary Sarah Sanders said Friday evening. OMB Deputy Director Russ Vought will handle day-to-day operations for the office, Sanders said in a statement.

A senior administration official said there is "no time limit" for Mulvaney to remain in the top White House post.

Mulvaney could lose the "acting" part of his title if things go well, according to another senior administration official.

The chief of staff job is "his to lose," this administration official told CNN.

The President's decision to appoint Mulvaney as his chief of staff began to materialize around 4 p.m. Friday afternoon, this official said.

Trump had been marinating on this idea throughout the day and ultimately decided to pull the trigger because the speculation and bowing out of candidates had begun to get out of hand.

The decision, the official said, was driven by a desire inside the West Wing to put an end to the immense speculation of the last week and to give what had become a chaotic process "a certain degree of finality."

A source familiar with the situation told CNN's Jim Acosta that the President wants Mulvaney to remain OMB director while serving as acting chief of staff. A White House official had earlier told CNN that Mulvaney was going step down from his OMB role and Vought would take over in an acting capacity.

Mulvaney, a conservative former South Carolina congressman, will be the third chief of staff in under two years to take on the task of running a White House besieged by a drumbeat of investigations and the expectation of more as Democrats take over the House of Representatives next month. Mulvaney's elevation to the role of chief of staff comes a week after Trump announced that his current chief of staff, John Kelly, will leave his post at the end of the year.

"I look forward to working with him in this new capacity as we continue to MAKE AMERICA GREAT AGAIN!" Trump tweeted of Mulvaney. "John will be staying until the end of the year. He is a GREAT PATRIOT and I want to personally thank him for his service!"

Trump appointed Mulvaney to the position in an acting role about a week after Vice President Mike Pence's chief of staff Nick Ayers declined Trump's offer to become chief of staff, refusing to agree to a two-year time commitment the President had requested. Their inability to come to terms sent Trump scrambling this week to reassess his list of contenders for chief of staff, leading to a search during which one candidate after the next withdrew from consideration or agreed with the President to take themselves out of the running.

While Mulvaney remained in the running this week, he had also indicated that he was not interested in the chief of staff role, with a source close to him instead indicating Mulvaney was interested in moving up to lead the Treasury or Commerce departments.

Full plate

Mulvaney will take over the job as special counsel Robert Mueller's investigation is once again taking center stage, with developments in recent days ratcheting up the legal jeopardy Trump could face. On Thursday, Trump's former longtime personal attorney and fixer Michael Cohen was sentenced to three years in prison, in part over a felony campaign finance violation he said he committed at Trump's direction.

A senior administration official said Mulvaney and Trump met earlier Friday afternoon and credited the close relationship Mulvaney has built with the President as a reason for his selection, as well as his experience in Congress.

"He got picked because the President liked him, they get along," the senior administration official said. "He knows Congress. He knows Capitol Hill."

Trump named Mulvaney in an acting capacity despite rejecting that very arrangement with Ayers a week ago. Ayers wanted to be named acting chief of staff and only take the job on a temporary basis, with a set departure date of this spring.

But, even after a statement was drawn up declaring Ayers as the next chief of staff, Trump changed his mind, deciding he wanted a permanent replacement for Kelly before unsuccessfully lobbying Ayers to take on the position for two years.

Right place, right time?

Friday's development surprised several White House officials when Trump abruptly made the announcement. But the choice may have all come down to timing.

The emerging narrative was that no one wanted the job. Ayers had declined it, several Cabinet members made it known they didn't want it and even the president of the Yankees issued a statement saying he wasn't interested.

Cue Mulvaney, who was in the West Wing on Friday to discuss the budget and a potential partial government shutdown next week. Kelly had chaired a senior staff meeting earlier in the morning that was primarily focused on the shutdown threat, one official noted, so a possible shutdown was a big topic of discussion in the West Wing.

Mulvaney then met with the President to discuss what to do about a shutdown, and walked out with the acting chief of staff job.

A source familiar with the chief of staff decision told CNN's Acosta that Mulvaney and Trump have been discussing the job over the past couple of days. Tired of the headlines about the chief search, Trump told Mulvaney he had a job to fill and and the OMB director said he preferred to do it on a temporary basis.

Having said that, this source stresses Mulvaney is "champing at the bit" to do the job as he views himself as a "turnaround specialist."

Mulvaney, the source added, became interested in the chief job over the summer as news stories focused on Trump's strained relations with Kelly.

He is not at all worried about dealing directly with Trump and all that comes with the job of chief, the source said, emphasizing he is "eager and happy to do it."

Mulvaney, the source said, "is one of the adults in the room."

Mulvaney took to Twitter to celebrate the news, calling it "a tremendous honor."

He previously represented South Carolina's 5th District in the House of Representatives, where he rose to prominence as a founding member of the Freedom Caucus, a group of hardline conservatives.

After joining the Trump administration as OMB director, he also soon took on the added job of acting director of the Consumer Financial Protection Bureau in November 2017, a role he served in until just earlier this month.

This story has been updated.