Martin County Sheriff's Office
Ryan Wesley Routh is seen in police custody after an apparent attempted assassination on September 15.
CNN  — 

The man accused of perching behind a chain-linked fence bordering Donald Trump’s Florida golf course with a rifle, allegedly waiting for a clear shot at the former president, is asking the judge overseeing the case to recuse herself.

Judge Aileen Cannon, who also presided over Trump’s classified documents case and ultimately decided to dismiss it, was randomly assigned to the case against Ryan Wesley Routh last month.

Defense attorneys for Routh argued in a Thursday court filing that because of this and the potential for Trump, if he were to win the presidential election, to nominate Cannon to a higher court, the judge should recuse herself from the case.

Earlier this year, Cannon ruled that special counsel Jack Smith was not lawfully appointed to his role overseeing the classified documents case. Smith is appealing that ruling.

From United States District Court for the Southern District of Florida
US District Court Judge Aileen M. Cannon.

Routh’s attorneys say that Trump has repeatedly praised Cannon by name after her decision to dismiss the case against him – including during the Republican National Convention – and note that Trump “as the alleged victim here” has “a significant stake in the outcome of this case.”

“Were he to become President in the future, he would have authority to nominate Your Honor to a federal judgeship on a higher court were a vacancy to arise,” the defense said.

They added: “Taken together, these unprecedented facts and circumstances might create an appearance of partiality in the mind of the public. Accordingly, the Constitution and the federal recusal statute require Your Honor to recuse herself from this case.”

The former president was golfing at his Florida club on September 15 when he was quickly rushed away after a Secret Service agent fired at the suspect after spotting him in the bushes at the perimeter of the club. Routh was later arrested and subsequently indicted. It was the second time in two months there had been an attempt on Trump’s life.

Routh has been charged with five counts, including attempting to assassinate a presidential candidate. He pleaded not guilty to all charges late last month.

The trial will be held at the federal courthouse in Fort Pierce, Florida, the same courthouse where Trump’s attorneys argued before Cannon.

This story have been updated with additional details.

CNN’s Piper Hudspeth Blackburn contributed to this report.