CARACAS, Venezuela — Venezuela’s former oil czar resigned as ambassador to the United Nations Tuesday on what he said were orders from President Nicolas Maduro, a sign of growing divisions in the ruling socialist party amid a deepening economic crisis.

Rafael Ramirez said on social media that he tendered his resignation a day prior, ending a week of speculation about the diplomatic envoy’s political standing after a cousin and several former acolytes were arrested in a highly-publicized purge in the oil industry.

Maduro has been trying to fortify his mandate by attacking corruption at state-run oil company PDVSA, which Ramirez led for over a decade.

But in a post on social media, Ramirez said: “I’ve been removed for my opinions.”

In a rambling, sometimes supplicant public letter to his former boss, Foreign Minister Jorge Arreaza, Ramirez described feeling heartbroken to no longer be serving the revolution started by the late Hugo Chavez, to whom he was a very close and trusted aide.

But as international pressure on Venezuela has increased amid an unprecedented economic crisis, he said he felt the need to speak out on policies he knew a great deal about from his 12-year run atop PDVSA, the source of almost all of Venezuela’s foreign currency earnings.

“I remain committed to insisting at the highest levels of the government for the need for deep reflection so we can retake the successful path laid out by Comandante Chavez for the benefit of our people and homeland,” he wrote in the four-page letter.

“I wouldn’t want to imagine how the attacks and vilification will increase now for expressing my opinions and stating my position in defense of the revolution,” he added.

Ramirez is the highest-level official to break with Maduro since chief prosecutor Luisa Ortega criticized the president’s attempts to gut the opposition-controlled congress and rewrite the constitution — actions that garnered international rebuke and triggered months of anti-government protests.

Like Ortega, who was ousted earlier this year, Ramirez pledged allegiance to Chavez’s revolution in his farewell missive and gave no indication that he would turn against his former comrades and assist U.S. authorities seeking to isolate Maduro.

Ramirez, who was never part of Maduro’s inner circle, is believed to have been the ultimate target of the housecleaning at PDVSA, which has already resulted in the arrest of two of his successors at the oil company and his cousin, Diego Salazar, who allegedly helped siphon off $1.6 billion to banks in the European principality of Andorra.

Ramirez in his letter defended his record as PDVSA’s president, saying that under his leadership the oil company successfully defeated attempts at “sabotage” and contributed to Venezuela’s economic and social development.

“I have a name and a career of activity that has been permanently subject to public scrutiny,” he wrote. “I’m not going to allow people to offend and attack me, affecting the unity of the revolutionary forces.”

Amid the ongoing purge, both Maduro and Ramirez have been careful to avoid mentioning each other by name, an indication of the deep fissures that exist within the ruling Chavista movement as triple-digit inflation and widespread shortages have eroded support for the government.

Many of the accusations against PDVSA officials in Venezuela stem from a U.S. probe into the company and its Houston subsidiary Citgo that has led to the arrest of more than 10 individuals, including two former close aides to Ramirez arrested last month in Spain.

With the possibility of arrest looming in Venezuela and in the U.S., it was unclear whether Ramirez remained in New York.

Ortega’s replacement as chief prosecutor, Tarek William Saab, declined to say Tuesday whether Ramirez was being investigated.


Goodman reported from Bogota, Colombia.