A 26-year-old man who was rescued after getting stuck in a downtown Denver chimney on Thursday afternoon told police he had been practicing parkour, authorities say.

Dustin Hinkle was booked into jail on suspicion of trespassing after firefighters freed him from the chimney in a building at 1742 Champa St.

Two others — 20-year-old Mary McHugh and 23-year-old Jayce Anderson — also were arrested, accused of trespassing and interfering with a police officer.

1742 Champa UPDATE: crews working to free a man trapped in a chimney. pic.twitter.com/Lr9e3cP8Sy — Denver Fire Dept. (@Denver_Fire) February 16, 2017

It took crews about two hours to free Hinkle from where he was stuck in the chimney in a vacant apartment. He fell between 30 and 35 feet down the old incinerator chimney.

Police spokeswoman Christine Downs said Hinkle told investigators he had been practicing parkour — the sport of running, jumping and climbing over obstacles in urban environments — when he became stuck.

According to a probable cause statement, Hinkle said he had been let into the apartment building by his friend “Jayce” and that he went up to the fourth floor roof area to “play parkour.”

Police say Jayce Anderson has no affiliation with the building where Hinkle fell into the chimney.

“Hinkle states that he dropped onto the open chimney from an above balcony and fell in,” the statement says. “Hinkle admitted that he had no legitimate business in the building.”

The damage caused by the rescue will likely be in the thousands of dollars, according to the police report.

1742 Champa UPDATE: man out of the chimney. Extent of injuries unkn. Patient conscious/ breathing upon removal. pic.twitter.com/oIpRlnTv7F — Denver Fire Dept. (@Denver_Fire) February 16, 2017

Hinkle is being held at Denver’s downtown jail. Jail records show he is 6 feet 5 inches tall and weighs 170 pounds.

“It appeared to me to be a pretty small chimney,” Denver Fire Department spokeswoman Melissa Taylor said.