An Iowa man was sentenced to 15 years in prison Wednesday for stealing and burning a church's rainbow LGBT pride flag.

No, Adolfo Martinez did not actually hurt or assault anybody in the process of stealing the flag off the front of the United Church of Christ in Ames and burning it in front of a bar he had been kicked out of last June. Though the 30-year-old did threaten to burn the bar down. And in an interview with Des Moines CBS affiliate KCCI he even confessed to the crime, making it clear (sort of; we'll get to that) that it was motivated by disapproval of LGBT people.

So Martinez faced not just arson and harassment charges but a hate crime enhancement, which pushes the potential sentence higher, putting him at a potential maximum sentence of five years for just the arson.

And Martinez also had two prior felonies, meaning he qualified as a "habitual offender" under Iowa's three-strikes law. Reports of Martinez's sentencing do not, unfortunately, explain what those convictions were for. A search through Iowa's court records shows that Martinez had previously been charged with driving without a license (which was dismissed), that he pleaded guilty to driving with a suspended license, and that in 2015 he pleaded guilty to dual charges of driving under the influence and possession of marijuana. No violent or serious felonies showed up in the state's records system.

Despite confessing to the crime on camera, Martinez pleaded not guilty and took the case to trial, where a jury convicted him. This pleased the church's pastor, Eileen Gibbie, who told the Des Moines Register, "I often experienced Ames as not being as progressive as many people believe it is, and there still is a very large closeted queer community here. But 12 people that I don't know, who have no investment in me or this congregation, said this man committed a crime and it was crime born of bigotry and hatred."

Under Iowa's "habitual offenders" guidelines, Martinez will not be eligible for parole for three years. The prosecutor recommended the maximum sentence of 15 years, and the judge agreed.

Let's circle back to Martinez's recorded confession to a KCCI reporter. You can view the entire interview here. It's striking for how casually he says things like "I have God on my side" and "It was an honor to do that. It was a blessing for the Lord, to stand for his words firmly against all odds, plain and simple." He also exhibits unusual body tics and gestures throughout the entire interview. After the interview is seemingly over, he gestures wildly while insisting that "even nonbelievers would agree with [me] on any given day" that he did the right thing by burning the flag. According to the Ames Tribune, on the night Martinez was arrested Ames Police Commander Jason Tuttle took note of the man's "bizarre behavior." It was not clear whether he was intoxicated at the time of his arrest, and he was not charged with public intoxication.

All this could indicate some mental health issues, and it should be a concern that not very much attention is being paid to that. People are clearly concerned that next time he might do something worse. Gibbie has told interviewers that she has been preparing for a possible attack on her church someday, invoking the deadly attack on the Emanuel African Methodist Episcopal Church in Charleston, S.C., in which nine were killed by white supremacist Dylann Roof.

If this cruelly long prison sentence is because people fear what Martinez might do, that's bad news. Prisons are not the right place to put people with severe psychological problems, and the people who work there are not suited to deal with whatever psychological issues might be driving Martinez's behavior.

Just on the face of it, sentencing a man for 15 years in prison for burning any flag for any reason is an injustice. Looking deeper into the circumstances suggests that Martinez is being locked away in a place where he will probably come out even more troubled.