Former Louisiana private investigator Jordan Hamlett pleaded guilty last year to using President Trump's Social Security Number in repeated attempts to access the president's tax data. On Wednesday, he was sentenced to 18 months in a federal prison for the crime.

Hamlett tried a half-dozen times to retrieve President Trump's tax information through a phony account he created via the use of an online federal student aid application. He then attempted to use the portal to access Trump's data from the IRS.

Prosecutor Ryan Rezaei emphasized the magnitude of the offense, saying, "You're talking about potentially altering a presidential election," adding, "Whether it was for fame or notoriety or money, we'll never know."

In an apology, Hamlett told the court that he had lost "everything," including his house and career, saying, "I was trying to help, and I made a bad decision. It was a mistake, and it was a bad mistake. The lesson's been learned."

US District Judge John deGravelles decided the case, and was appointed to the post by President Obama in 2014. The judge told the defendant that his crime was something to be taken seriously, saying, "This is not about the election: who won, who lost, politics. This was not a noble purpose."

For years, opponents and members of the media have called for Trump to release his tax returns, with some even encouraging entities to leak the information.

NBC host Rachel Maddow obtained two leaked pages of Trump's 2005 tax return in a much-hyped show in March 2017, with the White House pointing out that the disclosure was an illegal act.

A White House official at the time said, "You know you are desperate for ratings when you are willing to violate the law to push a story about two pages of tax returns from over a decade ago."

New York Times executive editor Dean Baquet said prior to the election in 2016 that he was also willing to risk jail time in order to get Trump's returns. Acknowledging that the disclosure of an unauthorized tax return is a violation of federal law, Baquet argued that the president's returns would be material information for the public, because Trump at the time was "a presidential candidate whose whole campaign is built on his success as a business man, and his wealth."