Rudy Giuliani and his legal team are looking to dispute the "constitutionality and legality" of the government's "conduct" in its investigation into the former New York City mayor and personal attorney of former President Donald Trump before the court appoints a special master in the case. 

In a letter unsealed Monday, sent last week to U.S. District Judge for the Southern District of New York Paul Oetken, Giuliani and his legal team said the conduct of federal investigators must first be reviewed and "resolved" before the appointment of a special master.

RUDY GIULIANI SLAMS RAID ON APARTMENT AS ‘OUT OF CONTROL,’ SAYS FEDS TRYING TO ‘FRAME’ HIM

"The validity of the 2019 covert warrant, and the handling of the information obtained by the prosecutor are serious questions that must be resolved before any further damage is done," they wrote. 

Federal investigators seized electronic devices from Giuliani's New York City apartment last month after executing a search warrant as part of a federal probe into whether he violated the law by lobbying the Trump administration on behalf of Ukrainian officials in 2019.

The warrant was based on suspicion that Giuliani violated the Foreign Agents Registration Act (FARA) in lobbying on behalf of Ukraine. FARA requires individuals to notify the State Department if they are acting as a foreign agent.

Giuliani also told Fox News the FBI previously obtained a covert warrant to search his iCloud records from May 1, 2018, to Nov. 4, 2019 — May 1 being the same day he began representing Trump amid the investigation into whether members of the Trump campaign colluded with Russia to influence the 2016 election. 

Federal prosecutors have asked the judge to appoint a special master to review the material seized by the FBI and to ensure investigators are not able to see records protected by attorney-client privilege. 

"The validity of the 2019 covert warrant, and the handling of the information obtained by the prosecutor are serious questions that must be resolved before any further damage is done," Giuliani's team wrote to Oetken. "Moreover, the fruits of the 2019 search were certainly used in some part to secure the 2021 largely duplicative search warrant and subsequent seizures."

"It is for those reasons that it is premature to consider a special master before these critical issues are resolved," they argued, further asking the court to rule on their filing "before making its decision on the appointment of a special master." 

FEDS RAID RUDY GIULIANI APARTMENT IN UKRAINE INVESTIGATION

Giuliani has denied the allegations against him, telling Fox News "there is absolutely no one" he would have been representing that could be construed as a violation of FARA. 

Giuliani told Fox News that because of his work as a personal attorney for Trump, he decided "the safest thing to do" was to refer any Ukrainian clients to Victoria Toensing.

The FBI also visited Toensing, a lawyer close to Giuliani. A well-placed source familiar with the situation said Toensing turned over a phone to the FBI but agents did not search her home.

The source also told Fox News that Toensing was informed she "is not the target of the investigation."

CLICK HERE TO GET THE FOX NEWS APP

Toensing’s attorneys also penned a letter to the court last week, demanding the court order prosecutors to return Toensing’s cellphone and data so that she can review it herself before turning it over to a special master. 

Toensing’s team, however, does not oppose the appointment of a special master but wants it to be "from the list of candidates proposed by the parties or other suitable candidates identified by the Court to oversee the process and resolve any disputes that may arise." 

The Associated Press contributed to this report.