WEST PALM BEACH, Fla. — President Trump announced Friday that he has selected outgoing Rep. Mark Meadows (R-N.C.) as his next White House chief of staff, tapping one of his most stalwart congressional allies to run the White House as he navigates a global health crisis in a reelection year.

“I have long known and worked with Mark, and the relationship is a very good one,” Trump tweeted shortly after arriving at his South Florida resort, where he is spending the weekend.

Meadows replaces acting White House chief of staff Mick Mulvaney, who is being appointed the U.S. special envoy for Northern Ireland, Trump said in a follow-up tweet. The president thanked Mulvaney for “having served the administration so well.” The envoy position has been vacant under the Trump presidency.

Mulvaney stepped into the role in an acting capacity in early January 2019 on the departure of John F. Kelly. Meadows will be Trump’s fourth White House chief of staff, after Mulvaney, Kelly and Reince Priebus.

Meadows, a four-term lawmaker, announced in December that he would not run for reelection and hinted in his statement that he would join either the administration or Trump’s 2020 campaign.

The former leader of the conservative House Freedom Caucus made his mark on Capitol Hill as a frequent thorn in the side of GOP House speakers while developing a close relationship with the president, becoming one of his most fervent defenders.

Trump often calls Meadows early in the morning and late at night, after growing distrustful of House Republican leadership and developing an appreciation of Meadows’s appearances on cable television.

Mulvaney was given advance notice of the tweet, a senior White House official said, but did not learn about the job change until the president had already offered Meadows the job.

Mulvaney’s departure is likely to mean broad changes in the West Wing. He also had been a member of Congress and of the Freedom Caucus before joining the administration, and he installed in government posts a number of die-hard loyalists and conservatives who often bragged about getting things done below the radar.

Some of those aides, particularly his principal deputy, Emma Doyle, had already seen their responsibilities shrink in recent months. Meadows has developed close ties with senior adviser Jared Kushner, the president’s son-in-law, who advocated for putting him in the post.

Mulvaney had also served as the director of the White House Office of Management and Budget and as the interim head of the Consumer Financial Protection Bureau. Russ Vought is now the acting OMB chief and could be nominated for the permanent post, according to two White House officials.

Trump sees Meadows as a fierce political operator who can be helpful to him as he goes into a stretch where his reelection campaign is likely to take him on the road three, and perhaps more, days per week.

The president recently had dinner with Meadows and his wife at the Trump International Hotel in Washington, a White House aide said. And at the recent wedding of White House aides Stephen Miller and Katie Waldman, Meadows sat next to Trump at the head table, attendees said, although Mulvaney did not.

Meadows thanked Trump in a statement Friday night. “It’s an honor to be selected by President Trump to serve alongside him and his team,” he said. “This President and his administration have a long list of incredible victories they’ve delivered to the country during this first term. With the best yet to come — and I look forward to helping build on that success and staying in the fight for the forgotten men and women of America.”

He has recently been at the White House nearly every day, advisers say, meeting with the president and others, particularly Kushner. He was seen last week having lunch with Marc Short, Vice President Pence’s chief of staff, in the White House Mess.

Aides had spoken of the two men having a deal for several months, and Trump began telling people on Thursday evening and Friday morning that he was going to tap Meadows, a person familiar with the choice said.

Meadows was instrumental in Trump’s impeachment defense, sometimes talking to the president four or five times a day, other advisers say. Trump did not have a volcanic falling-out with Mulvaney but never fully trusted him and kept him in the job in an acting capacity.

Like Mulvaney, Meadows is unlikely to prove as stiff a disciplinarian as Kelly, who encouraged the president when leaving to find someone who would challenge him or else he would find himself impeached.

One longtime Trump adviser said it was a questionable choice to install Meadows, given that he has no experience leading such a large operation.

“The president, and I’ve heard him say this, sees Mark as very good politically,” said the person, who spoke on the condition of anonymity to discuss private conversations. “But the president is a political animal. He needs someone who will actually take care of the store for him while he’s out running for reelection. And there’s a question in my mind whether Mark can do that.”

Meanwhile, Mulvaney often seemed out of the loop and sometimes even blissful about it.

He regularly traveled away from the president on weekends. When Trump clashed with national security adviser John Bolton last year and fired him, Mulvaney was in North Carolina, politicking for members of Congress.

At times in recent months, one close Trump adviser said, the president would say there was no need to loop Mulvaney into a particular discussion.

Mulvaney did not accompany the president Friday to Tennessee to survey storm damage, Atlanta to visit the Centers for Disease Control and Prevention, or South Florida for the weekend.

At a White House meeting with Trump, Pence and chief executives of major airlines earlier this week, Mulvaney stood off to the side, even as other senior administration officials sat at the table. Trump has been displeased generally with the administration’s handling of the novel coronavirus and has grown angry with Mulvaney on several occasions, aides said.

In a recent talk at the Oxford Union in England, Mulvaney seemed at peace with the idea that his days could be numbered.

“Generally speaking, this job does not last that long. Who knows how much longer I’m going to last?” Mulvaney said during the February remarks.

Meadows prides himself on being an operator in Washington. He is often at some of the city’s swankiest parties and galas, including the Meridian Ball, and at the British Embassy and other black-tie events. He also maintained close relationships with key congressional Democrats, such as the late representative Elijah E. Cummings (Md.), who was chairman of the House Oversight and Reform Committee.

He keeps a place in North Carolina but has spent much of his time in Washington in recent years.

“Mark is a really savvy strategist. You love him or hate him, but anyone who knows him knows he thinks three-dimensionally at all times,” a senior administration official said. “That’ll be his biggest value-add to the White House. He thinks of angles and approaches that others won’t, and thinks steps ahead. He’ll be crucial in helping get out of the cycle of being totally reactive.”

Some in the president’s orbit, though, worry that Meadows is duplicitous. Several current and former Trump aides say they feel he often tells the president one thing but sometimes tells lawmakers or Capitol Hill staffers something entirely different.

Dawsey reported from Washington. Jeff Stein and Philip Rucker in Washington contributed to this report.