Rudy Giuliani will help fill the void left by attorney John Dowd, who resigned last month.

WASHINGTON — Former New York City Mayor Rudy Giuliani, an outspoken supporter of Donald Trump since the early days of his campaign, is joining the team of lawyers representing the president in the special counsel's Russia investigation.

With the addition of Giuliani, Trump gains a former U.S. attorney, a past presidential candidate and a TV-savvy defender at a time when the White House is looking for ways to bring the president's involvement with special counsel Robert Mueller's investigation to a close.

The president has been weighing whether to sit for questioning by Mueller's team, and his legal team has repeatedly met with investigators to define the scope of the questions he would face. Giuliani will enter those negotiations, filling the void left by attorney John Dowd, who resigned last month.

It's a precarious time for Trump. His legal team has been told by Mueller that the president is not a target of the investigation, suggesting he's not in imminent criminal jeopardy. But he is currently a subject of the probe — a designation that could change at any time.

Trump personal attorney Jay Sekulow told The Associated Press that Giuliani will be focusing on the Mueller investigation — not the legal matters raised by the ongoing investigation into Trump attorney Michael Cohen. That probe is being led by the U.S. attorney in Manhattan, an office that Giuliani headed in the mid- to late 1980s.

Cohen's office, home and hotel room were raided last week by the FBI, who are investigating the lawyer's business dealings, including suspected bank fraud. They also sought records related to payments to porn actress Stormy Daniels and former Playboy model Karen McDougal, who both claim to have had sexual encounters with Trump several years ago. The White House has denied the claims.

The raids enraged Trump, prompting him to publicly weigh whether to fire Mueller or Deputy Attorney General Rod Rosenstein. He also intensified his public attacks on the Mueller investigation, calling it "an attack on our country."

In a statement announcing Giuliani's hire, Trump expressed his wish that the investigation wrap up soon and praised Giuliani, a fellow New Yorker, confidant and Mar-a-Lago regular.

"Rudy is great," Trump said. "He has been my friend for a long time and wants to get this matter quickly resolved for the good of the country."

Giuliani will be joining Sekulow on Trump's personal legal team but will be working closely with White House lawyer Ty Cobb, who has also been handling the administration's cooperation with the Mueller investigation.

"It is an honor to be a part of such an important legal team, and I look forward to not only working with the President but with Jay, Ty and their colleagues," Giuliani said in a statement.

In addition to Giuliani, two other former federal prosecutors — Jane Serene Raskin and Marty Raskin — will be joining Trump's legal team. The two, who are married and run a law firm together, are based in Florida but handle cases across the United States. Both have extensive experience prosecuting organized crime and representing defendants in complex white-collar and fraud investigations.

Giuliani, who was New York mayor during the Sept. 11 attacks, has known Trump for decades and his aggressive, hard-charging rhetorical style can at times mirror that of the president.

He had widely been expected to join Trump's administration. But Giuliani rejected the idea of becoming attorney general, lobbying Trump to name him secretary of state. Trump picked Rex Tillerson and Giuliani was left without a Cabinet post.

The two men share similar policy ideals, publicly supporting law enforcement in ways that have alienated minorities, and taking bullish stances on immigration enforcement.

In 2016, for instance, Giuliani fiercely criticized the Black Lives Matter movement, saying it encouraged violence against police. More recently, he has said he was consulted by Trump on how to implement the travel ban put in place last year against Muslim-majority nations.

Giuliani has been working at the influential law firm Greenberg Traurig, where he has been a senior adviser and head of the firm's cybersecurity, privacy and crisis management practice.

On Thursday, the firm's executive chairman Richard A. Rosenbaum released a statement saying Giuliani would be taking a leave of absence "for an unspecified period of time to handle matters unrelated to the law firm or its clients."

Giuliani's addition to the Trump legal team puts a renewed spotlight on his past legal and consulting work. His flirtation with becoming Trump's secretary of state was thwarted, in part, because of growing concerns about his overseas business ties.

After leaving office as mayor, Giuliani advised foreign political figures and worked for lobbying and security firms whose clients have had complicated relationships with the U.S. government. While not personally involved in lobbying, Giuliani spent years at firms that represented foreign governments and multinational companies, some of which had interests that diverged from those of the United States.

That included a trip Giuliani took to Belgrade to meet with leaders of a Serbian political party once allied with Serbian strongman Slobodan Milosevic.

His consulting firm also did work in the Persian Gulf monarchy of Qatar and received money for supporting the Mujahedin-e Khalq, the Iranian dissident group, even as it was a U.S.-designated foreign terrorist organization.

More recently, Giuliani's work for Greenberg Traurig, who is a registered foreign agent for the government of Turkey, has drawn attention for his involvement in a high-profile case with foreign policy implications for the U.S-Turkey relationship.

Last year, Giuliani joined former Bush administration attorney general Michael Mukasey in working to resolve the case of Reza Zarrab, a Turkish-Iranian businessman who was accused of participating in a scheme to help Iran evade U.S. sanctions. The case also focused on allegations of corruption against Turkish officials, including Turkey's president, Recep Tayyip Erdogan.

Erdogan's government had pressured the U.S. government to drop the case, and in early 2017, Giuliani met with Erdogan to discuss whether the case could be resolved outside of court.

Despite Giuliani's intervention, Zarrab later pleaded guilty and testified for U.S. prosecutors against a former Turkish bank official who was himself later convicted. Zarrab later said the failure of Giuliani's effort led him to cooperate with prosecutors.