Prison break plans by an inmate with a violent criminal history preceded last month's nearly weeklong lockdown at Stillwater prison, court documents show.

On July 15, state Department of Corrections officials learned from confidential sources that inmate William R. St. John, 45, was planning to escape with the aid of at least one accomplice within 24 hours, but the scheme was thwarted before it began. When his cell was searched, a suicide note was found that investigators later learned was part of the escape plan, according to the search warrant ­affidavits.

St. John, who is from South Dakota, has a lengthy prison record and has used numerous aliases, records show. He is serving time in prison for ­terrorizing two couples in a Bloomington house and was sentenced in federal court for robbing three banks in December 2011 and January 2012 in the days leading up to the home invasion and an earlier carjacking. He wasn't scheduled to be released until 2025.

That search of his cell led to St. John being placed in isolation. Corrections Department investigators then reviewed phone calls St. John had made from prison. Under department policy, inmates are allowed to make calls from prison pay phones at certain times by calling collect or by using pay cards.

The calls can be monitored, and St. John's calls to the cellphone of an accomplice identified as "Billie Joe" or "Billie Jo" revealed that St. John had been planning a fake suicide attempt by ingesting razor blades or prescription drugs. Billie Jo and possibly other accomplices were to wait for the ambulance along its expected route to the hospital, with a duffel bag of clothes for St. John, and were apparently planning to intercept the ambulance and help him escape, the affidavit shows.

Among the conversations, St. John asked who was coming with Billie Joe, and told Billie Joe not to carry out a planned robbery on the way to Stillwater. But none of that happened.

Department of Corrections officials declined to comment on the case, but the documents show the investigation is ongoing. The cellphone information collected — and St. John had told Billie Joe of the risk of using the phone — could help lead investigators to the accomplice or accomplices. It is also unclear if St. John will face more charges.

The date of the lockdown, July 26, was three days before the search warrant was executed, July 29. During a lockdown, usually prompted by a heightened security concern, prisoners don't have access to the prison school, industries, chapel and other activities. Cells are typically searched. The lockdown ended on Aug. 1.

Stillwater prison, housing about 1,600 men, many of whom are violent offenders, is Minnesota's largest close-custody prison. Records show St. John has been moved to the maximum security prison at Oak Park Heights.

Terror in Bloomington

St. John was arrested on the afternoon of Jan. 7, 2012, after he burst into a home in Bloomington, where two young couples were watching TV in the late afternoon, according to the criminal complaint. St. John, described as being on a crack binge, was brandishing a screwdriver, claimed he had a gun, threatened to shoot them and ordered them onto the floor. He then demanded a car and one hostage from among the four.

One of the men eventually went with St. John to the garage, while the others stayed inside and called police. When St. John turned for a moment, the young man tackled him, and as they struggled, one of the others knocked St. John out with an metal object and he was arrested.

Earlier in the day, under pursuit by federal marshals and police, St. John had allegedly carjacked a Cadillac and broke into three Bloomington homes near France Avenue S.

The series of events in the Twin Cities happened just weeks after St. John was released from federal prison in Missouri, where he had been held on convictions for theft, illegal weapons possession and auto theft. The trio of bank robberies began 18 days later, when St. John held up a Bank of the West in Fargo, N.D., then a U.S. Bank branch in Bloomington and a Wells Fargo Bank in Arden Hills, records show.

When he was in his 20s, court records show, St. John was convicted of property crimes in Minneapolis, where he then lived.

Twitter: @StribJAnderson