CHICAGO (AP) _ A homeless man was sentenced Thursday to more than three years in prison for a bank robbery he said he committed so he could go to jail for shelter and help with medical and drinking problems.

John Antonio Morocco, 51, got the minimum 37 months in prison and three years probation from a federal judge who expressed sympathy for his plight but denied his bid for special leniency.

''I don't think I can properly do anything else,'' said U.S. District Judge Paul E. Plunkett.

The judge said lawmakers who framed sentencing guidelines ''did not envision that poverty or lack of motivation is a reason to depart from the sentence.''

Morocco said it was the second time in five years that he robbed a bank so he could go to jail and get medical treatment.

He has nerve problems in his foot, is an alcoholic and had tried unsuccessfully to get treatment at Cook County Hospital, said his court- appointed attorney, John A. Meyer.

''I don't think it's worth locking someone up for three years because society can't deal in a realistic manner with these people,'' Meyer said at the sentencing hearing.

A shorter prison term would be more appropriate for Morocco, a former truck driver disabled for years by mental and emotional problems, chiefly depression, Meyer said.

''He's harmless, he's never been convicted of any violent crime,'' the lawyer said after sentencing.

Assistant U.S. Attorney George Jackson III objected to the plea for a shorter sentence, noting that Morocco walked away from his first heist, of a Chicago bank in 1985, with $3,500.

''He went on a spree, an across-the-country spree, at the bank's expense,'' Jackson said.

Morocco served less than a year for that robbery.

In the second robbery, in August, a teller refused to give Morocco any money and called a guard, who detained Morocco until his arrest.

During Thursday's hearing, Plunkett asked Morocco: ''What do you think is best for you? I have to decide what is best for society. What would be best for you?''

Morocco said he wanted to get his foot treated and lick his alcohol problem, but said he didn't know how much time in prison that would take.

Plunkett said the case was ''one of the more unusual I've dealt with.''

Meyer recommended Morocco be sent to a minimum-security prison and Jackson said he had no objections.