FILE - In this April 21, 2017 file photo, President Donald Trump listens as Treasury Secretary Steven Mnuchin speaks at the Treasury Department in Washington. A Louisiana private investigator accused of trying to illegally obtain Donald Trump’s tax returns before last year’s U.S. presidential election has been arrested again. At a hearing, Aug. 9, a judge found that Jordan Hamlett violated conditions of his pretrial release that involved computer monitoring and tracking of his location. Prosecutors say Hamlett tried unsuccessfully to obtain Trump’s tax returns using a U.S. Department of Education financial aid website. (AP Photo/Susan Walsh, File)

Jordan Hamlett, 32, committed "numerous violations," including hacking into email and social media accounts of a man at the request of the man's wife and traveling out of state without approval, prosecutors wrote in court records unsealed Friday.

Hamlett also accessed the internet with devices that are not monitored, prosecutors said.

Last year, Hamlett tried unsuccessfully to obtain Trump's tax returns using a U.S. Department of Education financial aid website, prosecutors said. Federal agents arrested him on a charge that he misused a Social Security number in the effort.

Hamlett's attorney accused agents of tricking his client by luring him to a Baton Rouge hotel where they questioned him on Oct. 27, less than two weeks before the election.

At that time, the agents did not know whether Hamlett had been successful in obtaining Trump's tax returns, prosecutors said in court records. The agents feared a public release of the documents could influence the election, according to a transcript of testimony obtained by The Associated Press.

Hamlett's lawyer didn't immediately return phone and email messages Friday. On Wednesday, a judge ordered him held by the U.S. Marshals Service but left open the possibility he could return to home detention at some point while awaiting his December trial.

Court records describe how federal agents in October worried that Hamlett could be armed as they orchestrated an elaborate operation to lure him to the Embassy Suites in Baton Rouge for questioning. Plainclothes officers blended in with guests inside the hotel. Other officers took up positions outside.

Hamlett agreed to an interview in the hotel's atrium and the agents questioned him for hours in hushed tones inside the crowded lobby, authorities said.

Hamlett immediately took credit for his "genius idea" to seek Trump's tax returns from a U.S. Education Department financial aid website — even before he was accused of anything, Treasury Department Special Agent Samuel Johnson testified.

Prosecutors have not revealed any possible motives for Hamlett's alleged attempt to get Trump's tax records. In court documents outlining the case, they wondered whether he was working with anyone or planned to sell them or release them.

Every president since Jimmy Carter has released their tax returns in what has become an American tradition during presidential elections, but Trump so far has refused to release his.