The Trump campaign announced Tuesday that Hogan Gidley is leaving his post at the White House and joining the campaign as national press secretary, beginning next month.

Gidley’s new role was previously held by Kayleigh McEnany, who left the campaign earlier this year to join the administration as White House press secretary.

KAYLEIGH MCENANY TAPPED AS NEW WH PRESS SECRETARY

Gidley has served as White House principal deputy press secretary since January 2019 and has been in the White House Communications office since October 2017.

A White House official told Fox News that the move has been in the works for about a month.

“Hogan Gidley has been at the President’s side for three years and now he joins the fight to re-elect him,” Trump campaign manager Brad Parscale said in a statement Tuesday. “He is a talented advocate and defender of the President and his policies and is never afraid to go into battle with hostile reporters and television hosts. Hogan is a great addition to the team and makes us even stronger.”

Gidley said Tuesday that he is "overwhelmingly humbled and deeply appreciative to President Trump for giving me a front row seat to witness history."

“My time at the White House has truly been a blessing beyond measure and getting to speak directly to the American people on behalf of this President has been an incredible honor," Gidley said. "President Trump’s record-setting accomplishments have improved the lives of all Americans, and I can’t wait to get over to the campaign and fight for his re-election.”

Gidley was in the running last year to replace former White House Press Secretary Sarah Sanders. Gidley was close to Sanders, having previously worked on her father Mike Huckabee’s presidential campaigns.

TRUMP NAMES KAYLEIGH MCENANY NEW WHITE HOUSE PRESS SECRETARY

Trump Communications Manager Tim Murtaugh touted Gidley's abilities as a "professional communicator" with "an impressive career and great experience in political campaigns.”

“He also has in-depth knowledge of President Trump’s accomplishments and a keen grasp of Administration policies," Murtaugh said. "Hogan has long been a valued member of Team Trump and we look forward to his putting his talents to work to re-elect President Trump.”

Meanwhile, the campaign announced that Erin Perrine, who has been serving as principal deputy communications director, will move into the role of director of press communications.

McEnany joined the White House in April, replacing Stephanie Grisham as press secretary. Grisham returned to the first lady's office as chief of staff and spokeswoman.

Fox News' Matt Leach and Kristin Fisher contributed to this report.