A Bismarck man pleaded guilty in federal court Friday to stealing a forklift and planning to “flip” President Donald Trump’s limousine on the day of his Mandan refinery speech.

Gregory Lee Leingang, 42, was charged in federal court with one count of attempting to enter or remain in a restricted building and on grounds while using a dangerous weapon, as well one count of attempting to damage government property.

Leingang reached a plea deal with federal prosecutors, entering a guilty plea on Friday for the first charge. In this case, the dangerous weapon was a forklift.

U.S. Assistant State’s Attorney Brandi Sasse Russell said Leingang was aware that the president was coming to town on Sept. 6, 2017, to give his speech at the Andeavor Mandan Refinery, an area which had been cordoned off for the motorcade route.

Prior to the president’s arrival at around 2 p.m., Leingang stole a forklift in Mandan and entered the motorcade route, according to Sasse Russell.

“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,” Sasse said. The forklift got stuck in a gated area and Leingang fled. He was apprehended by Mandan police, according to Sasse Russell. She said Leingang later admitted his plan to Mandan detectives, as well as a member of United States Secret Service.

“He was suffering a serious psychiatric crisis during this incident,” Michelle Monteiro, Leingang’s public defender, said in court.

Prior to stealing the forklift, Leingang set two fires that morning at the Bismarck Municipal Ballpark maintenance shop and the state parole and probation office, Monteiro said.

Leingang pleaded guilty to setting the fires and was sentenced to 10 years in state prison. He also pleaded guilty to stealing the forklift and a separate case of burglary. He was sentenced to five years for each of those charges. Leingang’s estimated release date is 2038.

Leingang told U.S. District Court Judge Daniel Hovland on Friday that he is diagnosed with attention deficit hyperactivity disorder and bipolar disorder, and he has been on and off medications since he was 12 years old.