MALONE, N.Y. -- A three-week manhunt that began when two convicted murderers staged a brazen prison break involving stolen power tools and hacksaw blades hidden in frozen beef ended when a single police officer spotted a suspicious man on a rural road near the Canadian border.

David Sweat's 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 Sunday by Sgt. Jay Cook as he ran for some trees near the town of Constable.

Sweat was in critical condition at an Albany hospital.

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

The two prisoners had been on the loose since June 6, when they cut their way out of a maximum-security prison 48 kilometres 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 tailor shop instructor had used to hide the tools she smuggled to Sweat and Matt. Palmer's attorney said he had no idea 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.

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

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.

Cuomo said many questions remained unanswered, 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."

Clinton County District Attorney Andrew Wylie said Sweat will be charged with escape, burglary and other charges. He and Matt are suspected of breaking into some of the region's many cabins during their time on the lam.

Matt and Sweat used power tools to saw through a steel cell wall and several steel steam pipes, bashed a hole through a 0.61-metre -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.

Associated Press writers Carolyn Thompson in Buffalo, New York, and Deepti Hajela in New York City contributed to this report.