Leingang, according to U.S. Assistant State’s Attorney Brandi Sasse Russell, stole a forklift and entered Trump’s motorcade route after the president arrived in the city one afternoon.

“The intent was to basically try to get to the limo, flip the limo and get to the president and he wanted to kill the president,” she said of Leingang.

U.S. President Donald Trump addresses a tax reform event with workers at the Andeavor Refinery in Mandan, North Dakota on Sept. 6, 2017.(REUTERS/Jonathan Ernst)

Leingang tried to escape after the forklift got stuck in a gated area, according to reports. He was caught by local police and allegedly confessed his plan to authorities, including the U.S. Secret Service.

A public defender argued in court that Leingang was “suffering a serious psychiatric crisis during this incident,” and reportedly set two fires earlier on the same day he stole the machinery.

Leingang was charged with one count of attempting to enter or remain in a restricted building and on grounds while using a dangerous weapon and one count of attempting to damage government property.

He entered a plea deal with federal prosecutors and was sentenced to five years in prison for stealing the forklift. He’s also serving time for pleading guilty to starting the fires and for a burglary case, and is expected to remain behind bars for decades.