By Michael Balsamo

Associated Press

MALONE, N.Y. — Some of the same state troopers who spent three weeks hunting down two escaped killers found themselves scrambling to get the lone survivor to a hospital, hoping to make him well enough to share the tale of how the pair managed to escape and stay on the run for so long.

David Sweat was shot and captured Sunday afternoon when a single state police sergeant spotted a suspicious man walking on a rural road in Constable, near the Canadian border. He was in critical condition at an Albany hospital Sunday night.

(Clinton County Correctional Facility Image)

His capture came two days after his fellow escapee, Richard Matt, was killed in a confrontation with law enforcement while holding a shotgun. Sweat was unarmed when he was shot twice by Sgt. Jay Cook as the fugitive ran for a tree line.

The men had been on the loose since June 6, when they cut their way out of a maximum-security prison about 30 miles away using power tools. Two prison workers have been charged with helping them.

Clinton correction officer Gene Palmer, charged with promoting prison contraband, tampering with physical evidence and official misconduct, is due in court Monday. His attorney has said he will plead not guilty.

Officials said Palmer gave the two prisoners frozen hamburger meat that a prison tailoring shop instructor had used to hide the tools she smuggled to Sweat and Matt. Palmer's attorney said he had no knowledge that the meat contained hacksaw blades, a bit and a screwdriver.

Prosecutors said the tailor shop worker, Joyce Mitchell, got close to the men while working with them and had agreed to be their getaway driver but backed out because she felt guilty for participating in the escape. Authorities also said Mitchell had discussed killing her husband as part of the plot.

Mitchell pleaded not guilty June 15 to charges including felony promoting prison contraband.

Sweat's capture ended an ordeal that sent 1,300 law enforcement officers into the thickly forested northern reaches of New York and forced residents to tolerate nerve-wracking armed checkpoints and property searches.

"The nightmare is finally over," Gov. Andrew Cuomo declared at a news conference.

Cook, a 21-year veteran, was alone and on routine patrol when he stumbled upon Sweat in Constable, about 30 miles northwest of the prison. He gave chase when Sweat fled and decided to fire fearing he would lose Sweat in the trees, state police said.

"I can only assume he was going for the border," Superintendent Joseph D'Amico said.

D'Amico said the men may have used black pepper to throw off their scent from the dogs that were tracking them; he said Sweat's DNA was recovered from pepper shakers found at one camp where the fugitives may have spent time.

Cuomo said many questions remained unanswered in the case, including whether the inmates had other accomplices.

"We have already started a full investigation," he said. "But today ends with good news. These were dangerous, dangerous men."

Sweat had not been formally interviewed by investigators as of late Sunday, but any information he provides could be critical to the investigation, Clinton County District Attorney Andrew Wylie said.

Sweat will be charged with escape, burglary and other charges, Wylie said. He and Matt are suspected of breaking into some of the region's many cabins during their time on the lam. Wylie said prosecutors would wait for Sweat to recover before charging him.

Matt and Sweat used power tools to saw through a steel cell wall and several steel steam pipes, bashed a hole through a 2-foot-thick brick wall, squirmed through pipes and emerged from a manhole outside the Clinton Correctional Facility in Dannemora.

Sweat was serving a sentence of life without parole in the killing of a sheriff's deputy in Broome County in 2002. Matt was serving 25 years to life for the killing and dismembering of his former boss.

Authorities said the men had filled their beds in their adjacent cells with clothes to make it appear they were sleeping when guards made overnight rounds. On a cut steam pipe, the prisoners left a taunting note containing a crude caricature of an Asian face and the words "Have a nice day."

Prosecutors said the inmates apparently used tools stored by prison contractors, taking care to return them to their toolboxes after each night's work.

Copyright 2015 The Associated Press