The handcuffs of inmates are seen during a play at a public theatre in Lima, June 20, 2012. Reuters/Enrique Castro-Mendivil

The gunman who reportedly killed a police officer on Monday afternoon in Queensland has died following a shootout with cops. Rick Maddison reportedly opened fire on officers after emerging from his bolthole on the same day.

According to police, Maddison ran from his hiding place, a shipping container on a rural property in the Lockyer Valley, Brisbane, and fired at the police. The Special Emergency Response Team officers fired back, killing Maddison in the process. He was declared dead on the scene.

“The male person who is the subject of our inquiries in relation to the death of Senior Constable Brett Forte had exited the building in which he was in,” Southern Region Assistant Commissioner Tony Wright told the media. “He had been challenged by police.”

Forte was the cop whom Maddison was suspected of killing on Monday afternoon. He tried to pull over Maddison, but the civilian got out of his vehicle and opened fire at Forte and his partner. He then ran toward the bush, where he apparently waited until he could shoot at Forte.

The QLD police declared an emergency situation under the Public Safety Preservation Act following the incident. Witnesses said the suspect ran onto a farm, where the police surrounded him.

Maddison was wanted on a number of charges. He was believed to have had drugs and multiple weapons on his person.

“I know was it was completely unexpected and Brett sadly never had a chance,” Police Union president Ian Leavers told Seven. “He never knew what his fate was going to be. Our thoughts are with his wife and his three children. He’s got a daughter and two sons.”

Read more: QLD cop killed by gunman on the run