(Reuters) - Former Venezuela oil minister Nelson Martinez, who was arrested in 2017 as part of a sweeping graft probe at state oil company PDVSA, has died in state custody, the prosecutor’s office said on Wednesday.

Slideshow ( 3 images )

Martinez, a chemist who also ran PDVSA and its U.S. subsidiary Citgo Petroleum, had been transferred to a military hospital from prison because of kidney problems, two sources familiar with the matter told Reuters earlier. He had a heart attack while receiving dialysis, they said.

In a statement, the prosecutor’s office said Martinez had a “serious chronic disease” that led to his death and offered condolences to his family.

Martinez was jailed after the country’s top prosecutor said he allowed a poor refinancing deal for Citgo to go ahead without government approval. He was arrested alongside Eulogio del Pino, another former oil minister and PDVSA president, who remains jailed.

Martinez’s death will likely fuel debate over the conditions of imprisoned former politicians and government officials, who in recent years have increasingly included former top leaders whom President Nicolas Maduro has accused of wrongdoing.

The death two months ago of a municipal legislator, Fernando Alban, sparked a nationwide scandal, with the government saying he committed suicide and opposition leaders insisting he was murdered in prison.

“The death of Nelson Martinez is the responsibility of Nicolas Maduro, who...held him hostage for a year knowing he was ill,” Rafael Ramirez, a fugitive oil minister and PDVSA president under late President Hugo Chavez who is wanted on corruption charges, wrote on Twitter.

The prosecutor’s office said Martinez was given adequate care.

“Until the last moment, the citizen in question received treatment and the required medical attention,” the prosecutor’s office said in its statement.

The opposition to Maduro’s socialist government, which has overseen a collapse of the OPEC nation’s economy, dismisses the probe as an internal power struggle within Maduro’s inner circle, noting that the industry has been under tight control of the ruling Socialist Party since early in Chavez’s 14-year rule.

Martinez had yet to appear before a judge at the time of his death, and the date for his preliminary hearing was pushed back several times, two of the people said. His lawyers began asking authorities months ago for Martinez to be granted house arrest, citing his ill health, one of the people said.

Martinez started having health problems while leading Citgo, based in Houston. Maduro named him oil minister in January 2017, and he assumed the dual role of PDVSA president later that year, replacing del Pino.

He had joined PDVSA in 1980 and oversaw the company’s offices in London, Argentina and Ecuador before being tapped to lead Citgo.