Two years ago, Rudy Giuliani finally got one thing he had been seeking in Ukraine: The Trump administration removed the U.S. ambassador there, a woman Giuliani believed had been obstructing his efforts to dig up dirt on the Biden family.

Giuliani's push to oust Ambassador Marie Yovanovitch not only became a focus of President Donald Trump's first impeachment trial, but it has now landed Giuliani in the cross hairs of a federal criminal investigation into whether he broke lobbying laws, according to people with knowledge of the matter.

The long-running inquiry reached a turning point when FBI agents seized telephones and computers from Giuliani's home and office in Manhattan, the people said. At least one of the warrants was seeking evidence related to Yovanovitch and her role as ambassador.

In particular, the federal authorities were expected to scour the electronic devices for communications between Giuliani and the Trump administration about the ambassador before she was recalled in April 2019, one of the people added.

The warrant also sought his communications with Ukrainian officials who had butted heads with Yovanovitch, including some of the same people who at the time were helping Giuliani seek damaging information about candidate Joe Biden and his family, the people said.

At issue for investigators is a key question: Did Giuliani go after her solely on behalf of Trump, his client? Or was he also doing so on behalf of the Ukrainian, who wanted her removed for their own reasons?

It's a violation of U.S. law to lobby the government on behalf of foreign officials without registering with the Justice Department; Giuliani never did. Even if the Ukrainians did not pay Giuliani, prosecutors could pursue the theory they provided assistance by collecting information on the Bidens in exchange for her removal.

One search warrant for Giuliani's phones and computers explicitly stated that the possible crimes under investigation included violations of the Foreign Agents Registration Act, according to the people with knowledge of the matter.

Giuliani has long denied that he did work at the behest of the Ukrainians, or that he accepted any money from them, and he has said that he did not expressly urge Trump to fire the ambassador.

Giuliani's work to oust Yovanovitch was part of a larger effort to attack Joe Biden and tie him to corruption in Ukraine, much of which played out in public.

But intelligence officials have long warned that Giuliani's work in Ukraine had become ensnared with Russia's efforts to spread disinformation about the Biden family to weaken Trump's election rival.

Senior officials had warned Trump in late 2019 that Giuliani was pushing Russian disinformation, and the intelligence community had warned the American public that Moscow's intelligence services were trying to hurt Biden's election chances by spreading information about his family's work in Ukraine.

On Wednesday, after FBI agents seized his devices, Giuliani again denied any wrongdoing. He said the search warrants demonstrated a "corrupt double standard" on the part of the Justice Department, which he accused of ignoring "blatant crimes" by Democrats, including Biden.

Giuliani's lawyer, Robert Costello, said his client had twice offered to answer prosecutors' questions, except those regarding Giuliani's privileged communications with Trump.

The warrants don't accuse Giuliani of wrongdoing, but they underscore his legal peril: They indicate a judge has found that investigators have probable cause to believe that a crime was committed and that the search would turn up evidence.

The investigation grew out of a case against two Soviet-born businessmen, who had helped Giuliani search for damaging information about Biden and his son Hunter. At the time, Hunter Biden served on the board of an energy company that did business in Ukraine.

In 2019, the businessmen, Lev Parnas and Igor Fruman, were charged in Manhattan, along with two others, with unrelated campaign finance crimes. An October trial is set.

In the Giuliani investigation, the federal prosecutors have focused on the steps he took against Yovanovitch. Giuliani has acknowledged that he provided Trump with detailed information about his claim that she was impeding investigations that could benefit Trump, and that Trump put him in touch with Secretary of State Mike Pompeo.

After a few aborted attempts to remove her, Yovanovitch was ultimately recalled as ambassador in late April 2019 and was told that the White House had lost trust in her.

Giuliani said in an interview in late 2019 that he believed the information he had provided the Trump administration did contribute to Yovanovitch's dismissal.

Correction: An earlier version of this article misstated whether Rudy Giuliani received a formal warning from the FBI about Russian disinformation. Giuliani did not receive such a so-called defensive briefing.