Venezuelan President Hugo Chavez will undergo his fourth cancer surgery in Cuba in the coming days, the fiery leader said over the weekend, explaining that he had decided to designate a successor in case the illness forces him to resign from the office he has held for nearly 14 years.

The announcement was the clearest sign yet that Chavez’s battle with cancer could abruptly end his self-described socialist revolution. It prompted his followers to flock to churches and public squares Sunday to pray and chant slogans supporting him.

Saturday night, in a dour address on television, the president said “some malignant cells” had been detected in his pelvic region that would necessitate surgery in Havana’s Cimeq hospital, where he has been treated before. Chavez said he would fly to Cuba on Sunday, although the government did not confirm his departure.

Chavez, 58, said his vice president and confidant, Nicolas Maduro, would assume control if he has to step down. The populist leader urged supporters to vote for Maduro, who made his mark as Chavez’s foreign minister, should there be a need for a presidential election.

“If something happens that sidelines me, which under the constitution requires a new presidential election, you should elect Nicolas Maduro as president,” Chavez said, sitting at a table with Maduro at his side. “I ask that of you from my heart.”

Moises Naim, a former Venezuelan government official who is an analyst at the Carnegie Endowment for International Peace in Washington, called the announcement “basically a farewell speech.”

“He said goodbye to power,” Naim said. “It’s a statement full of resignation and appeals to God. There is no plan. The only talk of the future is that there will be elections and he asks for people to vote for Maduro.”

Chavez’s departure would mark the end of a tumultuous rule in which the leftist former army officer harnessed Venezuela’s considerable oil wealth to shower the poor with social programs while engineering a sharp diplomatic shift away from the country’s historical ally, the United States.

Chavez’s government forged alliances with some of Washington’s most intransigent adversaries, including Cuba, Iran and Syrian President Bashar al-Assad. He has used his lock on practically all levers of power, from the courts to the congress, to push forward the nationalization of hundreds of private companies and the seizure of wide swaths of farmland.

For Venezuela’s opposition, the possible scenarios that Chavez discussed in Saturday’s address amount to the first time the president has publicly acknowledged the severity of his illness and the impact it could have on the future of the country.

No one in the government is authorized to discuss Chavez’s medical condition except Chavez himself, who astonished his countrymen in June 2011 by telling them he had gone under the knife twice to remove a malignant growth. A third surgery followed in February.

Chavez has never disclosed what kind of cancer he has or where it is located. He has twice pronounced himself cured, without providing details.

“It was time to tell the truth to the country,” said Maria Corina Machado, an opposition member of the National Assembly. “Venezuela has been living with a lot of uncertainty. In a democratic country where the constitution is obeyed, the president must talk about his health when it is compromised.”

Should Chavez die or have to resign, the constitution calls for Venezuela to stage presidential elections within 30 days. Maduro, a 50-year-old former union organizer and bus driver who has risen through the ranks of Chavez’s movement, would become the candidate of the president’s United Socialist Party.

The constitution also requires that the vice president fill in for the president should he be temporarily absent. Chavez has spent many weeks in Cuba in the past 18 months, undergoing chemotherapy and radiation treatments. But he has remained in charge of the government, signing decrees and bills from Havana.

Machado said the opposition will call for a strict interpretation of the constitution now that Chavez has suggested the possibility of stepping aside.

“Article 233 of the constitution is clear about the only mechanism, an election within 30 days,” she said. “He can’t name a successor. It’s the Venezuelan people who decide.”

An election would mean a contest between Maduro and the opposition’s leader, Henrique Capriles.

Capriles lost to Chavez in the presidential election held Oct. 7, with the incumbent winning 55 percent of the vote to the challenger’s 44 percent. Polls, though, have shown that Capriles is more popular in Venezuela than all of Chavez’s closest associates, including Maduro.

The president’s swearing-in for another six-year term is scheduled for Jan. 10, but his announcement, following weeks in which he remained out of public view, raised questions about whether the inauguration will take place.

“This is how life goes,” Chavez said in his televised address. “God willing, I hope to be able to give you good news in the coming days.”