AUBURN — A Lewiston man is going to prison for 21 years for killing a 38-year-old woman and burying her body in the basement of the apartment building where he lived.

Twenty-one-year-old Rob Ryder was sentenced Wednesday in Androscoggin County Superior Court.

Ryder pleaded guilty to manslaughter last June in the death of Danita Brown of New Gloucester. Her decomposing body was found in the basement of Ryder’s apartment house in July 2011.

Police say Ryder told them he killed Brown by hitting her over the head with a clock after he paid her to have sex.