A New York State trooper had the law on his side when he shot unarmed fugitive David Sweat, apparently in the back, as the escaped killer ran toward a forest near the Canadian border.

State and federal law allows the use of deadly force to prevent an escape if the officer believes the suspect poses a significant threat. Law enforcement experts say this shooting was clear-cut.

"There cannot be any cleaner situation than this one," said Maria Haberfeld, head of the law and police science department at John Jay College of Criminal Justice. "You cannot shoot any fleeing felon, but certainly you can shoot the one who poses a real threat. There was no reason to believe this person who had killed a police officer before was not posing a real threat."

The same legal reasoning applied to the killing of his accomplice, Richard Matt, who was shot three times in the head on Friday. Unlike Sweat, he was found with a weapon — a 20-gauge shotgun.

Sweat eluded capture for two more days, until he ran across Sgt. Jay Cook, a 21-year veteran who was part of the huge manhunt for the two convicted murderers who used power tools to break out of the Clinton Correctional Facility in Dannemora on June 6.

Cook was alone in his car when he spotted someone walking along the side of the road less than three kilometres from the Canadian border. He got out of his car, approached the man and said: "Hey, come over here," New York State Police Supt. Joseph D'Amico told reporters.

Sweat fled and Cook chased him, firing twice, fearing he would lose the fugitive in the trees, officials said. Photos appeared to show emergency crews tending to Sweat's back as he sat bloodied in a field. His condition was upgraded to serious from critical on Monday.

Deadly force authorized

A 1986 U.S. Supreme Court case known as Tennessee v. Garner laid out how force can be used to capture a fleeing suspect: Deadly force can't be used to prevent escape unless "the officer has probable cause to believe that the suspect poses a significant threat of death or serious physical injury to the officer or others."

New York state law also allows for deadly force if a dangerous convict is escaping from a detention facility — which is why armed guards may be stationed in towers at prisons.

Sweat's shooting differs from the recent killing of Walter Scott in South Carolina because Scott was stopped for a minor traffic infraction, was unarmed and was not considered a dangerous criminal, experts said. The white officer who shot the black man five times in the back has been charged with murder.

"But these prisoners, they've gone through the justice system," said Bill Johnson, head of the National Association of Police Organizations. Because they were convicted, he said, "they're not presumed to be an innocent citizen walking down the street."

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

'Great police work'

Some people online questioned the decision to fire, but many lauded the trooper. Gov. Andrew Cuomo called Cook a hero and congratulated him on his "great police work." Onlookers erupted in cheers when the ambulance carrying Sweat passed by.

Carl Thomas, who lives about a kilometre from where Sweat was captured, said troopers definitely made the right decision by killing Matt and shooting Sweat.

"If he would've got in the woods right there, there would be no chance" to catch him, Thomas said of Sweat.

david sweat richard matt

Composite photo of David Sweat, left, and Richard Matt who escaped from the Clinton Correctional Facility in Dannemora, N.Y. on June 6, 2015. (New York State Police via AP)

In other developments, prison guard Gene Palmer, charged with promoting prison contraband, tampering with physical evidence and official misconduct, was due in court Monday. His attorney has said he will plead not guilty.

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.