Image copyright Reuters Image caption Joyce Mitchell apologised to the court, saying she made a "horrible mistake"

A former jail worker will be behind bars for up to seven years after helping two convicted killers escape from a New York prison.

Joyce Mitchell, 52, provided inmates Richard Matt and David Sweat with tools that allowed them to break through the wall of their cell to freedom.

Mitchell sobbed in court on Monday, saying she made a "horrible mistake".

Matt and Sweat escaped on 6 June, sparking a huge three-week manhunt across New York and Vermont.

Hundreds of police officers scoured the remote wooded areas near the Clinton Correctional Facility in Dannemora, New York.

"A large portion of the local population were terrorised," Judge Kevin Ryan said on Monday. "Many were forced to flee their homes."

The inmates stayed together for week,s sleeping outside and hiding in vacation homes, but they eventually separated.

Both men had been serving life sentences at the maximum-security prison when they escaped.

Matt, who had escaped from prison before, was convicted of dismembering his former employer while Sweat had been found guilty of killing a sheriff's deputy.

Image copyright AP Image caption Inmates David Sweat (left) and Richard Matt were on the run for most of June

Image copyright Getty Images Image caption The manhunt involved hundreds of police officers from across the region

Matt was shot and killed by police officers on 26 June after he was spotted fleeing a cabin near the Canadian border with New York.

Sweat was wounded and captured two days later.

In addition to smuggling blades and other tools, Mitchell had planned to drive the getaway car, but she backed out the day of the escape.

Mitchell had said Matt and Sweat said they would kill her husband, who also worked at the prison, if she did not co-operate. However, the judge said he did not find that "explanation credible".

Prosecutors had alleged that Mitchell helped the pair because she was having a sexual relationship with Matt.

Mitchell was arrested shortly after the escape and aided investigators in the manhunt. She accepted a plea deal with prosecutors rather than face trial.

"If I could take it all back, I would," she told the judge. "I never intended for any of this to happen."