An investigation is underway after a murder suspect was released from prison, despite telling prison officers that he was due to appear in court.

Murder suspect Martynas Kupstysj, 25, told officers at Lincoln Prison he was due in court, and was waiting to be taken to his court appearance along with other inmates.

Incredibly, despite this officers handed over his belongings and let him walk out of prison, the Lincolnshire Echo reports.

Mr Kupstysj spent several hours wandering around Lincoln city centre before prison officers realised their mistake and launched a panicked search to find him.

Prison staff eventually spotted Kupstysj waiting at a bus stop outside the prison, and took him back into custody.

A Ministry of Justice spokesperson said the investigation would be conducted by a senior governor.

"A prisoner from Lincoln was released in error on 8 August. The police were notified immediately and he was arrested within hours. An investigation by a senior governor has been launched. We take public protection extremely seriously and this type of incident is a very rare but regrettable occurrence."

Peter Wright, the governor of HMP Lincoln, said the mix-up was "a very grave matter". "This should not happen," he added. "I've made dramatic changes already. It was a fundamental breach of what we are here to do."

Lithuanian Mr Kupstysj is charged, along with his brother-in-law Andrus Giedraitis, with the murder of 24-year-old Latvian Ivans Zdanovics.

Mr Zdanovics' body was found following a fire at his Lincolnshire home in January.

His wife Sandra Giedraityte, 28, is charged with perverting the course of justice.

Kupstysj and his brother-in-law will appear in a retrial early next year.