CEDAR RAPIDS, Iowa (AP) -

A federal judge has sentenced a Marion man to over two years in prison for taking heroin to a friend who had overdosed on the drug and was being treated at a drug treatment center in Cedar Rapids.

Thirty-year-old James Sullivan was sentenced on Wednesday in U.S. District Court in Cedar Rapids. He pleaded guilty in May to distributing heroin within 1,000 feet of a school.

Prosecutors say Sullivan's friend had overdosed on heroin on Dec.7, 2011, and had to be hospitalized. Three days later, Sullivan went to a treatment facility and took two syringes of heroin to his friend.