PITTSBURGH—A man who took a hostage at a downtown skyscraper and posted to Facebook during the ordeal has been sentenced to between six and 15 years in state prison.

Twenty-three-year-old Klein Michael Thaxton of McKeesport was sentenced Wednesday on kidnapping, ransom, aggravated assault and other charges. Last September he held a 59-year-old businessman hostage for six hours before surrendering peacefully.

Police say Thaxton was off his medication for schizophrenia, bipolar disorder and depression when took the man hostage. In July Thaxton was also charged with attacking another inmate at the Allegheny County Jail.

Kirsha Weyandt, Thaxton's court-appointed defense attorney, did not immediately return a call seeking comment.