Gunshots in Pincher Creek that prompted officials to warn the public to stay away from the Alberta town, close schools and municipal buildings and even send in an RCMP armoured vehicle have led to a charge against a man for the careless use of a firearm.

The RCMP's emergency response team and a negotiator, as well as RCMP from surrounding communities, were called in to respond to what was described as a "dangerous" emergency situation Wednesday in the town of about 3,600 residents about 215 kilometres southwest of Calgary.

It started with reports of shots fired around 4:40 a.m. CT.

When two officers arrived at a home in response, they were shot at, police said Wednesday.

Schools, municipal buildings and some roads were shut down as police investigated.

The public was warned to stay away from the town.

Large police response

Twelve RCMP officers from Pincher Creek and neighbouring detachments responded after the gunshots, as did the southern Alberta Emergency Response Team based out of Calgary. An RCMP helicopter from Edmonton also assisted, said Cpl. Curtis Peters.

"Initially, the call [came] in of persons reporting gunshots in a residence," Peters said. "When members went to first check that out and then they were greeted by further gunshots … that resulted in the deployment of the members from nearby detachments. They held the scene and ensured the public's safety while the emergency response team rolled in."

No one was hurt.

Police stand at the house in Pincher Creek where shots were fired. On Friday, RCMP said Dewey (Todd) Starzyk, 53, had been charged with the careless use of a firearm as well as failing to comply with the conditions of a recognizance. (Sarah Lawrynuik/CBC)

By early afternoon, a man had been taken into custody without injury. Authorities said he was known to them.

Two other people living in the basement were safely removed from the house, RCMP said.

Dewey (Todd) Starzyk, 53, is charged with the careless use of a firearm as well as failing to comply with the conditions of a recognizance.

Starzyk has previous firearms-related charges against him and was set to go to trial for those alleged offences next month.

He is in custody and will appear in court in Pincher Creek on Tuesday