The Florida man charged with taking the lectern of House Speaker Nancy Pelosi (D-Calif.) and parading it around the Capitol on Jan. 6 reached a plea agreement with prosecutors.

Adam Johnson, 36, pleaded guilty in federal court Monday to entering and remaining in a restricted building or grounds, a charge that comes with a maximum sentence of one year in prison and a fine of $100,000. In exchange, prosecutors agreed to dismiss charges of theft of government property and violent entry and disorderly conduct on Capitol grounds.

The agreement also included provisions around a potential book, or “something of that nature,” that Johnson has expressed interest in publishing about his involvement on Jan. 6. The plea deal gives the government rights to any profit that Johnson acquires as a result of that product for five years.

The parties agreed on sentencing guidelines ranging from zero to six months in prison, with fines between $500 and $9,500. The government did not request that Johnson be held before sentencing.

Johnson was one of the most visible Jan. 6 defendants after images of him posing for photographs while cradling the lectern went viral.

U.S. District Judge Reggie B. Walton allowed Johnson to remain in Florida before sentencing, but he made it clear Monday that the defendant would have to prove that he understood the gravity of his actions to avoid time behind bars.

“It’s very concerning to me that you were weak-minded enough that you would follow a lie and do what you did,” Walton said. “So why shouldn’t I lock you up, sir? Why should I think you won’t do this again?”

“I’ve spent a lot of time listening to a lot of information, reading a lot of things, and I think maybe your assessment is accurate that I got caught up in a moment,” Johnson replied.

Johnson traveled to the District from Tampa on Jan. 5 to attend a rally in support of President Donald Trump the next day, according to the statement of offense filed in court. He was part of the crowd that marched from the rally to the Capitol, witnessed clashes between police officers and rioters, and, eventually, entered the Senate wing door to the Capitol, prosecutors said.

Once in the Capitol, according to the court filing, Johnson posed near a sign that read “Closed to all tours” and later posted the image on Facebook, along with the caption “No.” He later found the podium for the House speaker near a spiral staircase and carried it to the Capitol Rotunda, where he posed for a picture before a photographer with a professional camera and asked another woman to take pictures of him standing in front of the podium using his phone, according to the court filing.

He left the podium in the center of the room and continued to wander through the building — witnessing a group of protesters standing behind a line of U.S. Capitol Police officers and another group banging against doors and chanting “stop the steal,” the court filing said. At one point, prosecutors alleged, Johnson shouted that the bust of George Washington would be “a great battering ram.”

“Your honor, I understand that my actions are regretful,” Johnson said in court Monday. “I’m here pleading guilty because I am guilty.”

Also Monday, a Pennsylvania man who organized charter buses for 200 people to attend the events on Jan. 6 was sentenced to 60 days in jail, when prosecutors had only sought 14 days in jail. It was the largest increase in sentence by a judge so far, 46 days, above what the government had sought, according to a sentencing grid filed by prosecutors in the case.

U.S. District Judge Royce C. Lamberth also imposed the maximum $5,000 fine, which is the largest one yet imposed in a Jan. 6 case, according to the government’s sentencing chart.

Lamberth said he gave Frank J. Scavo, 59, of Old Forge, Pa., credit for being truthful with the FBI, pleading guilty relatively early in the case, and not harming anyone. The organizing of buses from Pennsylvania was not discussed in the hearing, but the judge noted that “without you and the other people who participated in this, this whole event, that ended up in preventing the government from being able to function, would not have happened” and that had to be weighed in the sentence.

“I can’t imagine entering a government building that is closed to the public, but I did,” Scavo said. “Entering the Capitol on January 6 was a crime. I regret doing it.”