A Kansas man who robbed a bank to get away from his wife has been sentenced to six months house arrest as his punishment due to his mental health.

Lawrence John Ripple, 70, walked into the Bank of Labor just down the street from police headquarters in Kansas City with a note demanding money and that he had a gun.

He had written the note at home in front of his wife after telling her he would "rather be in jail than at home," the Kansas City Star reported.

After the teller handed him nearly $3,000 in cash, Mr Ripple waited in the lobby for police to arrive.

Mr Ripple had multiple bypass heart surgery in 2015 and suffered from depression that, according to lawyers, went undiagnosed.

Prior to the robbery, he lived a normal, law-abiding life as a husband and stepfather to four children. His public defender called the robbery a "cry for help".

At the sentencing trial Mr Ripple said he had sought medical help for his mental health and said he "feel[s] like his old self".

Criminals and their nicknames Show all 5 1 / 5 Criminals and their nicknames Criminals and their nicknames Criminals and their nicknames Alphone 'Scarface' Capone (AFP/Getty) AFP/Getty Criminals and their nicknames Criminals and their nicknames Ilich Ramirez Sanchez, aka Carlos the Jackal (EPA) EPA Criminals and their nicknames Criminals and their nicknames Ted Kaczynski, the Unabomber Criminals and their nicknames Criminals and their nicknames Peter Sutcliffe, the Yorkshire Ripper (GEtty) Getty Criminals and their nicknames Criminals and their nicknames Jihadi John AP

The vice president of the bank and the teller both supported a request for leniency for Mr Ripple given his mental health state. It is incredibly rare for someone who commits a bank robbery not to be sentenced to prison and Mr Ripple's sentence could have faced up to 37 months per local law.