YORK, Pa. — Authorities say a homeless man shot by police after allegedly pointing a BB pistol at officers told investigators that he began the incident by torching a trailer so that he could go to jail.

York police said in charging documents that 23-year-old Luis Amadiz-Rodriguez was homeless and living in the trailer, and “He wanted to go to jail so he lit the trailer on fire.” Firefighters quickly doused the blaze shortly before 7 p.m. Friday.

Police found him on a neighbor’s balcony and said he dropped a knife when ordered to do so but then pulled a BB pistol and pointed it at officers, who fired, hitting him in the arm.

He’s now facing charges including aggravated assault and arson endangering persons. Court documents don’t list a defense attorney.