The onetime Baltimore gangster who inspired characters on the critically acclaimed HBO series "The Wire" has died in a federal medical prison in North Carolina, officials said Wednesday.

Nathan Barksdale, 54, died on Saturday in the Federal Medical Center in Butner, North Carolina, spokesman Greg Norton said.

"He had been ill so it was not unexpected," Norton said, without giving a cause of death.

Barksdale had been serving a four-year sentence for drug crimes when he died.

Show creator David Simon has said he partly modeled Avon Barksdale, a drug kingpin on "The Wire," on Nathan Barksdale, who ran a ruthless heroin operation in Baltimore in the 1980s.

Simon also used aspects of Barksdale for other characters in "The Wire." The gritty street drama centered on drug dealers, police, schools, politicians and the media in Baltimore and ran from 2002 to 2008.

The Baltimore Sun, which first reported his death, said Barksdale had been shot more than 20 times over the years and had his right leg amputated below the knee.

He was convicted in 1985 of torturing three people in a public housing project and sentenced to 15 years in prison. After his release, he took part in a city anti-violence program but was arrested on drug charges in 2014 and returned to prison.

(Reporting by John Clarke in Washington; Editing by Ian Simpson and Bill Trott)