COLUMBUS, Ga. — Lance Brown was hungry and homeless, so he decided to get thrown in jail by hurling a brick through a glass door at the Columbus courthouse building.

Brown, 36, spent nine months in jail before his April trial. On Tuesday, he was sentenced to another month behind bars, and three years of probation that includes a six-month stay in a halfway house.

Brown’s case illustrates the struggle prosecutors face when dealing with homeless defendants who resort to crime to seek the safety of prison. They weigh whether to devote scarce resources to prosecuting a lower-level offense with the burden that comes with upholding the law and deterring others from breaking it.

Faced with more nights on the street, Brown said he thought lofting the brick through the building would give him at least a few hours in a place where “someone’s going to offer me a sandwich and drink.”