Trump in 2018 signed a sweeping national-security bill into law.
The bill increased punishments for those who mishandle classified information.
The measure is of note after the raid at Mar-a-Lago connected to government documents.
A bill which former President Donald Trump signed into law in 2018 could be used to punish him if he's found to have mishandled classified information after leaving office.
FBI agents on Monday raided Trump's Mar-a-Lago resort in Florida as part on an investigation into whether Trump wrongly kept hold of classified material after he left office.
Bradley P. Moss, a national-security attorney, told Insider that Trump could face five years in prison if he's found guilty under a national security bill which he signed as president.
The bill, which made changes to the Foreign Intelligence Surveillance Act (FISA) was signed into law by Trump in January 2018.
It upgraded the seriousness of wrongly moving classified material, turning it from a misdemeanor into a felony - and increasing the maximum punishment from one year to five.
Moss noted that it was passed in the wake of Trump's relentless attacks during the 2016 presidential campaign on Hillary Clinton for allegedly mishandling classified information.
But now it is Trump who is under pressure.
"Trump certainly has legal exposure to Section 1924 given it was classified documents from his spaces in the White House that were removed to Mar-Lago," said Moss.
In a tweet Tuesday in the wake of the FBI raid on Trump's Mar-a-Lago resort, Jeff Yarbro, an attorney and Democratic state senator in Tennessee, pointed out it was Trump who had signed the bill now looming over him.
The National Archives and Records Administration in February said that classified material was found among boxes of things that had been taken from the White House to Mar-a-Lago when he left office.
Legal analyst Glenn Kirchner at the time told MSNBC that the former president was facing a potential "five year felony" in a seeming reference to the law Trump had strengthened in 2018.
At the time, the classified-information measures attracted little attention, with the focus of news coverage being the renewal of sweeping surveillance powers in the bill.
According to an analysis by Moss and other analysts at the Just Security blog, it is one of a number of laws Trump might have violated if he's found to have mishandled classified material.
There are some doubts about whether the bill Trump signed into law could be used to prosecute him, said Moss, as it's unclear whether it applies to former presidents.
Trump has vehemently denied any wrongdoing in relation, saying that he had fully cooperated with requests from the National Archives and characterizing the raid as a politically motivated.
His aide, Kash Patel, told Breitbart that Trump declassified the material before leaving office under the president's broad powers for deciding what should remain secret.
Moss said "efforts by Trump to declassify records before he left office" were another key issue that could impact whether the measures could be used to prosecute Trump.
Trump's office did not immediately reply to a request for comment from Insider.