Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Former New York City Mayor Rudolph Giuliani is joining President Donald Trump’s legal team, providing advice on how to deal with the special counsel’s investigation into Russian interference into the 2016 election, attorney Jay Sekulow confirmed to NBC News on Thursday.

"Rudy is great," Trump said, according to a statement provided by Sekulow, a member of the president's personal legal team dealing with the Russia probe. "He has been my friend for a long time and wants to get this matter quickly resolved for the good of the country."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Giuliani is a longtime Trump ally who served as a bombastic campaign surrogate — at times boasting of his ties to the FBI. He joins the team as the president’s apparent frustration with the probe deepens, particularly in the wake of an FBI raid on the office and hotel room of his personal attorney, Michael Cohen.

Giuliani formerly ran the U.S. Attorney's office for the Southern District of New York, the same office that conducted the raid of Cohen's office. The interim U.S. Attorney in that office, Geoffrey Berman, has been recused from the Cohen investigation; he is a former law partner of Giuliani.

He joins Sekulow and Ty Cobb, amid the ongoing debate over whether the president should sit for an interview with special counselor, Robert Mueller III, and the president's continued insistence that he could fire the special counselor if he wanted to do so.

"I have had the privilege of working with Mayor Giuliani for many years, and we welcome his expertise," Sekulow said in a statement, which added that Jane Serene Raskin and Marty Raskin were also joining the team. "Mayor Giuliani expressed his deep appreciation to the President for allowing him to assist in this important matter."

“I’m doing it 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,” Giuliani said in an interview with the Washington Post.

Thursday's legal team shakeup is not the first.

Last month, John Dowd resigned from Trump’s team amid the news that the president was hiring attorneys Joseph diGenova and Victoria Toensing. Days later, Sekulow announced that diGenova and Toensing would not be joining the legal team, citing conflicts of interest.