Former New York City Mayor Rudy Giuliani is joining President Donald Trump’s personal legal team to help with Special Counsel Bob Mueller’s probe into potential Russian meddling in the 2016 election, The Washington Post reported on Thursday.

News that the two had been discussing a role was first reported by The Daily Beast earlier in the day.

Though talks had been ongoing, a formal announcement was delayed by a slew of foreign policy matters that took over much of the president’s time and agenda. A source familiar with the arrangement said that Trump had been preoccupied by North Korea and Syria, which limited his availability to speak with potential new members of his legal team.

Giuliani told the Post that he was joining the team “because I hope we can negotiate an end to this for the good of the country and because I have high regard for the president and for Bob Mueller.”

In a statement, the president said: “Rudy is great. He has been my friend for a long time and wants to get this matter quickly resolved for the good of the country.”

And Trump lawyer Jay Sekulow added: “I have had the privilege of working with Mayor Giuliani for many years, and we welcome his expertise. Mayor Giuliani expressed his deep appreciation to the President for allowing him to assist in this important matter.” Sekulow additionally announced the hiring of Jane Serene Raskin and Marty Raskin—both former federal prosecutors—to join the president’s legal team.

Trump has had notable difficulties in recruiting new lawyers. And in the former New York City Mayor, he has brought on board a close ally with strong roots in the legal world.

Giuliani served as the United States Attorney for the Southern District of New York during the 1980s. But his past several decades have been spent predominantly in politics. During the 2016 election, Giuliani campaigned with Trump and gave an impassioned speech in favor of Trump at the Republican National Convention in Cleveland.

“What I did for New York City, Donald Trump will do for America,” he said at the convention. “I have known Donald Trump for almost 30 years. And he has created and accomplished great things. But beyond that this is a man with a big heart. Every time New York City suffered a tragedy, Donald Trump was there to help.”

After Trump’s victory, however, Giuliani wasn’t selected for any cabinet post, leaving him on the outside of an administration he’d helped elect. Axios reported last summer that Trump had considered replacing Attorney General Jeff Sessions with Giuliani. But that too never happened.

The former mayor has largely stayed out of public view since then and has said little, if anything, about the Mueller-led investigation.

Giuliani previously represented Reza Zarrab, a Turkish businessman charged with participating in a scheme to evade American sanctions on Iran. Zarrab testified in federal court last November that two of his lawyers––presumably Giuliani and Michael Mukasey––tried to negotiate his release through a prisoner swap with Turkey. A federal judge called one of Giuliani’s affidavits about Zarrab’s alleged crimes “surprisingly disingenuous.”

Giuliani is not the only Trump campaign alum with Turkey ties. Former national security advisor Michael Flynn, who pleaded guilty to lying to the FBI, also cultivated close links with the country.

This isn't the first time Giuliani has found himself enmeshed in the president's legal troubles. After Trump announced his first travel ban—restricting immigration from several, predominantly Muslim, countries— Giuliani bragged to Fox News' Judge Jeanine Pirro that he came up with the idea for it.

“When he first announced it, he said ‘Muslim ban,’" Giuliani told the host. "He called me up, he said ‘put a commission together, show me the right way to do it legally.’ I put a commission together.”

That quote was referenced frequently by litigants who sued to block the ban as evidence it was motivated by anti-Muslim animus rather than national security concerns. Giuliani later walked back the statement.

—This story has been updated since first publication.