A private investigator pleaded guilty Monday to repeatedly using Donald Trump’s Social Security number in an attempt to uncover the his tax returns through a security flaw in a U.S. government website, the Associated Press reported.

Attorneys for Jordan Hamlett, 32, had previously described their client as a ‘“white hat hacker” who exposes cybersecurity issues in services so they can be fixed. The Department of Justice, meanwhile, pushed to have that description thrown out of the courtroom and argued it was merely to cover for a crime. The case raised questions around how far and in what circumstances researchers can go in investigating cybersecurity issues without running afoul of the law.

Hamlett tried to get hold of Trump’s tax returns in September 2016 through the Free Application for Federal Student Aid (FAFSA) website by providing an Social Security number. He was ultimately unsuccessful, but authorities charged Hamlett with misuse of an Social Security number. According to court records, Hamlett quickly admitted the crime in an interview with investigators.

The case is obviously pertinent as Trump has not released his own tax returns, something that presidential candidates and presidents have traditionally done since Jimmy Carter.

In order to meet Hamlett at a Baton Rouge hotel, Investigators had an undercover agent contact Hamlett under the pretense of hiring him, according to testimony from Special Agent Samuel Johnson from the U.S. Treasury Inspector General for Tax Administration earlier this year. Hamlett met the undercover agent at a Baton Rouge, Louisiana, hotel.

As Johnson highlighted, Hamlett’s attempt to grab Trump’s tax records was within weeks of the 2016 election, and investigators were concerned that an unauthorized release of Trump’s returns may influence the election.

“There was [sic] thoughts this could be something that would affect the election if the information had been received,” Johnson said.

In the initial interview, investigators also asked Hamlett whether he was familiar with the hacking collective Anonymous, according to the testimony.

“At the time Anonymous had been established as people that have released some of President Trump’s personal identifying information and things of that nature,” Johnson said. (Hackers previously linked the last four digits of the SSN mentioned in Hamlett’s indictment to Trump.)

“At the time it was believed that with the information that was used to attempt to obtain the tax returns, there was a possibility that somebody could figure out a way to get the tax returns out of the database and release them, sell them, whatever they were going to do,” Johnson continued.

On the same day Hamlett probed the FAFSA website for information on Trump’s tax returns, as The Daily Beast previously reported, he tried to warn the IRS about the apparent security issues with the site, according to a filing from the defense.

Earlier on in the case, Hamlett’s attorneys said their client had also reported a cybersecurity issue to the Livingston Parish Sheriff’s Office, which allowed access to investigation reports, as well as personal information about the sheriff’s office employees. Indeed, according to a defense court filing from the end of November, “as part of plea negotiations, Hamlett provided the Government with numerous examples of his prior cooperation with law enforcement.”

Michael Fiser, Hamlett’s attorney, did not immediately respond to a request for comment. Hamlett faces a maximum of five years in prison, and a $250,000 fine, the AP added.