The man accused of trying to assassinate Donald Trump near one of his golf courses has asked the president to consider settling the matter over an 18-hole match in a bizarre legal filing.

Ryan Wesley Routh filed a deranged motion requesting strippers and a putting green for his imagined extravaganza, just days before his criminal trial was due to begin.

'A round of golf with the racist pig, he wins he can execute me, I win I get his job,' Routh wrote in the motion filed on Tuesday.

The 59-year-old's motion comes as he faces life in prison on charges of attempted assassination of a major presidential candidate, assaulting a federal officer.

Routh was caught hiding in shrubbery at Trump International Golf Course in Palm Beach on September 15 armed with a rifle.