CARACAS, Venezuela (AP) — Venezuelan President Hugo Chavez was recovering in Cuba on Tuesday after an operation targeting an aggressive cancer that has defied multiple treatments and has prompted the socialist leader to name a political successor.
Vice President Nicolas Maduro spoke on Venezuelan television after the surgery, saying that ‘‘it’s been a complex operation.’’ He indicated that the surgery lasted more than six hours and said it was completed ‘‘correctly and successfully.’’
Maduro, who was designated by the president on Saturday as his preferred political heir, made the announcement in Caracas flanked by other Chavez aides and military commanders. Maduro then led an outdoor vigil where the president’s supporters joined hands in prayer and sang along with a recording of Chavez singing the national anthem.
‘‘We've lived through complex moments of tension,’’ Maduro said, without giving details.
It was the fourth cancer-related operation that Chavez has undergone since June 2011.
Three days before the surgery, Chavez announced that he needed to have surgery again after tests showed ‘‘some malignant cells’’ had reappeared in the same area of his pelvic region where tumors were previously removed.
Chavez said beforehand that the surgery would present risks.
Afterward, Maduro said that Chavez had been moved to a room to recover and begin ‘‘special treatments’’ under the care of a team including medical experts from Venezuela, Cuba and elsewhere.
With Chavez in Havana were his children and grandchildren as well as political allies including National Assembly President Diosdado Cabello and Oil Minister Rafael Ramirez, Maduro said.
‘‘We’re waiting for you here,’’ Maduro said, addressing Chavez on television. ‘‘You have to return, and we’re waiting for you here, your children, we who've sworn to be loyal to you even beyond this life.’’
Maduro added: ‘‘If there were another life, we'd be loyal and we'd be your soldiers forever.’’
After he spoke, some of the president’s supporters in a Caracas plaza broke into chants of ‘‘El Comandante will live!’’
Supporters held a prayer meeting in downtown Caracas while the surgery was under way, singing hymns.
‘‘We ask God, to allow him to live,’’ said Carmen Romero, who participated in the gathering. Some held up posters of Chavez as they sang.
On the city’s streets, Venezuelans on both sides of the country’s deep political divide voiced concerns about Chavez’s condition and what might happen if he ultimately doesn’t survive his illness.
‘‘It’s difficult to think about Venezuela without Chavez,’’ said Rafael Perdomo, a mechanic who has supported the president since 1998, when he first ran for the presidency. ‘‘I fear that we, the poor, could lose everything if Chavez dies.’’
Chavez recently said for the first time that if his illness cuts short his presidency, Maduro should take his place and be elected president to continue on with his socialist movement. But Perdomo said he didn’t trust Maduro the way he trusts Chavez.
Others Venezuelans said that while they’re sorry about Chavez’s health and wish him the best, it isn’t a particular concern for them. Many were out buying Christmas gifts and shopping for food as they prepared for the holiday season.
‘‘I'm sorry about what is happening to the president, but for many of us life goes on,’’ said Maria Colmenares, a housewife and opposition supporter, as she left a supermarket with bags of groceries and stood on a street corner waiting for a taxi.
‘‘I feel pity for Chavez and his people, especially the Chavistas because they have put all their hopes in the president and they know that nobody is capable of replacing Chavez,’’ Colmenares added. ‘‘None of Chavez’s collaborators have his charisma.’’
Chavez received a flurry of get-well messages from leaders across Latin America, including the presidents of Chile, Peru and other countries. Ecuadorean President Rafael Correa, who visited Chavez in Havana on Monday, said his ally was undergoing a ‘‘very delicate operation.’’
‘‘He’s passing through one of the hardest moments of his life. Our heart and our solidarity are with a historic president,’’ Correa said at an event Tuesday in the Ecuadorean city of Tulcan.
Those sending messages of support ahead of the operation included American actor Sean Penn, who joined a Monday night candlelight vigil in Bolivia organized by the Venezuelan Embassy. He wore a track suit emblazoned with the colors of Venezuela’s flag, just like one that Chavez has worn.
‘‘He is one of the most important forces we've had on this planet. And I will wish him nothing but that great strength he has shown over and over again,’’ Penn told a crowd at the vigil, his voice quavering with emotion. He called Chavez ‘‘inspiring.’’
Throughout his nearly 14-year-old presidency, Chavez has been loved by some Venezuelans and reviled by others as he has nationalized companies, crusaded against U.S. influence and labeled his enemies ‘‘oligarchs’’ and ‘‘squalid ones.’’
The 58-year-old president won re-election in October and is due to be sworn in for a new six-year term on Jan. 10. If Chavez were to die, the constitution says that new elections should be called and held within 30 days.
Chavez first announced he had been diagnosed with cancer in June 2011. He underwent a surgery for a pelvic abscess, and then had a baseball-sized tumor removed from his pelvic area. In February, he underwent another surgery when a tumor reappeared in the same area.
He has also undergone months of chemotherapy and radiation treatments. Throughout his treatments in Cuba, Chavez has kept secret some details of his illness, including the exact location and type of the tumors.
Chavez had previously said in July that tests showed he was cancer-free. But he said over the weekend that a new round of tests in Cuba had again found cancerous cells.
Diego Torres in Quito, Ecuador, and Associated Press writers Ian James and Fabiola Sanchez in Caracas contributed to this report.
Christopher Toothaker on Twitter: http://twitter.com/ctoothaker