Bernard Madoff, who was convicted in 2009 for running a massive Ponzi scheme, has died aged 82 in federal prison where he was serving a 150-year sentence, the US Bureau of Prisons said.

Madoff had been suffering from chronic kidney failure and several other medical ailments.

He had been held at a federal prison in Butner, North Carolina, after being sentenced in June 2009 to a 150-year term for engineering a fraud estimated as high as $64.8 billion.

Madoff's thousands of victims, large and small, included individuals, charities, pension funds and hedge funds.

Among those he betrayed were the actors Kevin Bacon, Kyra Sedgwick and John Malkovich; baseball Hall of Fame pitcher Sandy Koufax; and a charity associated with director Steven Spielberg.

Owners of the New York Mets, longtime Madoff clients, struggled for years to field a good baseball team because of losses they suffered.

"We thought he was God. We trusted everything in his hands," Nobel Peace Prize winner Elie Wiesel, whose foundation lost $15.2 million, said in 2009.

Some victims lost everything. Many came from the Jewish community, where Madoff had been a major philanthropist.

Madoff's crimes were revealed to authorities in 2008 by his two sons, who were not part of the scheme.

The fraud exposed holes at the US Securities and Exchange Commission, which through incompetence or neglect botched a half-dozen examinations.

"There were several times that I met with the SEC and thought, 'They got me'," Madoff told lawyers in a prison interview, according to ABC News.

Madoff had been the largest market-maker on the Nasdaq, once serving as its non-executive chairman.

His brokerage firm was located in a Midtown Manhattan tower known as the Lipstick Building.

Employees there said they felt like part of Madoff's family. They did not know he was running his fraud on a different floor. Only a trusted few did.

In a typical Ponzi scheme, money from newer investors is used to pay sums owed to earlier investors.

Madoff said his fraud began in the early 1990s, but prosecutors and many victims believe it started earlier.

Investors were entranced by the steady, double-digit annual gains that Madoff seemed to generate, and which others found impossible to explain or duplicate.

The money helped Madoff and his wife, Ruth, enjoy luxuries such as a Manhattan penthouse, a French villa and expensive cars and yachts, with a combined net worth of about $825 million.

But no one from Madoff's immediate family was in the Manhattan courtroom when US District Judge Denny Chin sentenced him.

And no family, friends or supporters submitted letters attesting to his good character or deeds in support of leniency.

"I believed when I started this problem, this crime, that it would be something I would be able to work my way out of, but that became impossible," Madoff told the court.

"As hard as I tried, the deeper I dug myself into a hole."

Madoff also addressed victims in attendance, saying, "I am sorry. I know that doesn't help you."