Justice Department political leaders repeatedly stymied efforts by federal prosecutors in Manhattan to obtain a search warrant last year for the digital records of Rudolph W. Giuliani, former president Donald Trump’s personal lawyer, frustrating career government attorneys and effectively leaving the decision to the incoming Biden administration, people familiar with the matter said.

The move, first reported Wednesday by CNN, ultimately may have a limited impact on the ongoing federal investigation of Giuliani, as officials said prosecutors simply could renew their request. Like others, they spoke on the condition of anonymity to discuss a case that remains politically sensitive.

Still, the passage of time is unhelpful to any investigation, as documents could be destroyed and witnesses’ memories may fade. And the matter will present a critical first test for President Biden’s Justice Department, where officials are trying to separate the institution from political matters and restore public faith that it will enforce the law impartially.

Spokespeople for the Justice Department and the U.S. attorney’s office in Manhattan declined to comment. Robert Costello, a lawyer for Giuliani, did not respond to a request for comment, but he told CNN he had not been contacted by federal prosecutors and did not think his client had done anything wrong.

Giuliani has rigorously defended his activities as above board.

The investigation came to light in October 2019 after federal prosecutors in Manhattan charged two of Giuliani’s associates, Lev Parnas and Igor Fruman, with a scheme to funnel foreign money to U.S. politicians while allegedly trying to influence U.S.-Ukraine relations.

Parnas and Fruman had been working with Giuliani to investigate then-candidate Biden. Separately, Giuliani was paid $500,000 for consulting work by a company Parnas co-founded, Fraud Guarantee, that remains a focus of federal prosecutors.

People familiar with Giuliani’s case have said previously that investigators were scrutinizing the former New York mayor’s consulting business and examining donations made to America First Action, a pro-Trump ­super PAC set up by Trump’s advisers and allies after the 2016 election, as well as its affiliated nonprofit entity. Investigators were looking for evidence of several possible crimes, including foreign lobbying registration violations, destruction or alteration of documents, aiding and abetting federal crimes, and foreign contributions to U.S. candidates, according to people familiar with the matter.

By summer 2020, prosecutors decided they had probable cause to get a warrant to examine Giuliani’s communications, people familiar with the matter said. Mindful they were seeking the communications of a lawyer in a politically sensitive case, Manhattan prosecutors approached leaders at the Justice Department in D.C. seeking approval to move forward. They were rebuffed, people familiar with the matter said, though varying explanations for the denial have been cited.

One person familiar with the matter said the request was considered to have come too close to the presidential election, noting that Justice Department policy and tradition prohibit taking public steps in a case with potential electoral ramifications.

Others, though, said the prosecutors first approached senior officials at a time when those policies do not normally apply, and that Justice Department officials expressed other objections.

After the election in November, prosecutors in Manhattan renewed their bid for a search warrant, people familiar with the matter said. Officials in the deputy attorney general’s office again turned them down, the people said.

One person said that officials harbored concerns about the strength of the evidence, and that the renewed request was coming during Trump’s challenges of election results. Giuliani played a key role in those efforts.

Career Justice Department officials, though, felt their probable cause for a search warrant was strong, people familiar with the matter said. They noted that even amid Trump’s post-election challenges, department leaders approved issuing a subpoena and taking other steps in another politically sensitive investigation: that involving Biden’s son Hunter.

“At the end of the day, we’re not talking about getting an indictment,” said a person familiar with the matter. “We’re talking about getting a search warrant. What’s the purpose of a search warrant? To get more evidence.”

The seriousness of Giuliani’s legal jeopardy remains unclear; people familiar with the matter cautioned that just because investigators wanted search warrants as they investigated him does not by itself indicate he will be charged with a crime. Giuliani was notably not among those whom Trump pardoned before leaving office, despite widespread speculation that the outgoing president might do so.

The investigation represents a remarkable downfall for a former U.S. attorney who once was dubbed “America’s mayor” and widely praised for his leadership of New York City after 9/11. In the 1980s, Giuliani led the same federal prosecutor’s office now investigating his conduct.

Giuliani once fancied himself a possible secretary of state for Trump, and he served as the president’s personal lawyer during the special counsel investigation into possible coordination between Trump’s 2016 campaign and Russia to influence that year’s election. All the while, he separately maintained a lucrative consulting and legal practice, taking on clients from all over the world while wielding considerable influence inside the U.S. government.

His eclectic efforts raised some alarm inside Trump’s administration. At one point, then-Attorney General William P. Barr warned Trump that Giuliani had become a liability. But Trump never distanced himself, even as Giuliani’s legal woes seemed to intensify and questions mounted about possible conflicts between his work for the president and his work for foreigners.

For his part, Giuliani has insisted he kept the two roles separate.

Jacobs reported from New York. Julie Tate contributed to this report.