Chavez acknowledged the seriousness of his health situation in a televised address, saying for the first time that if he suffers complications Vice President Nicolas Maduro should be elected as Venezuela's leader to continue his socialist movement.
Several outside medical experts said that based on Chavez's account of his condition and his treatment so far, they doubt the cancer can be cured.
Chavez said he hasn't given up.
"With the grace of God, we'll come out victorious," said Chavez, who held up a crucifix and kissed it during his Saturday night appearance.
The 58-year-old president is still scheduled to be sworn in for a new six-year term Jan. 10. He has been in office for nearly 14 years, since 1999.
"There are risks. Who can deny it?" Chavez said, seated at the presidential palace beside Maduro and other aides. "In any circumstance, we should guarantee the advance of the Bolivarian Revolution."
Chavez, who won re-election on Oct. 7, said he would undergo surgery in Havana in the coming days. Lawmakers on Sunday unanimously agreed to grant him permission to leave the country for the operation.
During a televised session, opposition lawmakers in the National Assembly agreed to Chavez's request and also said that Maduro should take on his duties during his temporary absence, as the constitution specifies. Opposition lawmaker Julio Borges criticized the incomplete information that has been released about Chavez's cancer, saying: "Venezuela has a right to know the truth."
Throughout his treatment, Chavez has kept secret various details about his illness, including the precise location of the tumors and the type of cancer. He has said he travels to Cuba for treatment because his cancer was diagnosed by doctors there.
Some of the pro-Chavez lawmakers cried and their voices cracked with emotion as they praised him and wished him a full recovery. "Onward, commander!" they chanted in unison.
"You are invincible," said Maria Leon, a pro-Chavez congresswoman, expressing confidence he would be back for his inauguration to start a new term.
National Assembly President Diosdado Cabello said there are no plans at this time for Chavez to cede power, even temporarily, as president.
"He's not asking for permission to leave his duties," Cabello said. "The chief of this revolution is Hugo Chavez."
Under the Venezuelan constitution, as vice president Maduro would automatically fill in as president on a temporary basis should Chavez be unable to finish the current term concluding in early January.
But the constitution also says that if a president-elect dies before taking office, a new election should be held within 30 days. In the meantime, the president of the National Assembly is to be in charge of the government.
More than 1,000 of the president's supporters gathered Sunday in Plaza Bolivar in downtown Caracas to show solidarity, many wearing his movement's red T-shirts while a marching band played.
The president, who had just returned from Cuba early Friday, said on television late Saturday that tests had found a return of "some malignant cells" in the same area where tumors were previously removed.
Chavez's quick trip home appeared aimed at sending a clear directive to his inner circle that Maduro is his chosen successor. He called for his allies to pull together, saying: "Unity, unity, unity."
He also said it's important for the military to remain united, saying: "the enemies of the country don't rest."
Chavez said his doctors had recommended he have the surgery right away, but that he had told them he wanted to return to Venezuela first.
"What I came for was this," he said, seated below a portrait of independence hero Simon Bolivar, the inspiration of his Bolivarian Revolution movement.
Chavez had named Maduro, his longtime foreign minister, as his choice for vice president three days after winning re-election. The 50-year-old Maduro, a burly former bus driver, has shown unflagging loyalty and become a leading spokesman for Venezuela's socialist leader in recent years.
Chavez said that if new elections are eventually held, his movement's candidate should be Maduro.
"In that scenario, which under the constitution would require presidential elections to be held again, you all elect Nicolas Maduro as president," Chavez said. "I ask that of you from my heart."
Chavez called him "one of the young leaders with the greatest ability to continue, if I'm unable to ... continue with his firm hand, with his gaze, with his heart of a man of the people."
Chavez was flanked by both Maduro and Cabello, and he held a small blue copy of the constitution in his hands.
State television showed Chavez's supporters congregating in squares in various cities, and some joined hands to pray for his health. At the gathering in downtown Caracas, some expressed optimism that Chavez would pull through it. Others said they weren't sure.
"I love Chavez, and I'm worried," said Leonardo Chirinos, a construction worker. "We don't know what's going to happen, but I trust that the revolution is going to continue on, no matter what happens."
Chavez called his relapse a "new battle." It will be his third operation to remove cancerous tissue in about a year and a half.
The president underwent surgery for an unspecified type of pelvic cancer in Cuba in June 2011, after an operation for a pelvic abscess earlier in the month. He had another cancer surgery last February after a tumor appeared in the same area. He has also undergone chemotherapy and radiation treatments.
Chavez said in July that tests showed he was cancer-free. But he had recently reduced his public appearances, and he made his most recent trip to Cuba on the night of Nov. 27, saying he would receive hyperbaric oxygen treatment. Such treatment is regularly used to help heal tissues damaged by radiation treatment.
Chavez said that while he was in Cuba tests detected the recurrence of cancer.
Dr. Julian Molina, an oncologist at the Mayo Clinic in Rochester, Minnesota, said that based upon the limited information Chavez has made public about his cancer it appears to be terminal.
"For a patient in similar circumstances where you have given surgery as a first line of treatment, then chemotherapy, then radiation therapy and you are still dealing with a tumor this late that indicates that it is not a curable cancer," he told The Associated Press in a telephone interview.
Molina and other medical experts said Chavez's next surgery likely won't be high-risk.
"I think if they are planning to do any surgery it is to improve his quality of life, meaning to remove a tumor that is located in a place that is either producing some pain or some difficulty for the patient," Molina said.
He agreed with other doctors queried by the AP that Chavez could have a sarcoma, which he said tend to spread to the lungs. Based on Chavez's treatment regimen, he said, it's highly unlikely he's suffering from colon or prostate cancer, though it could also be bladder cancer.
Molina said it is extremely difficult to say how long Chavez has to live. "You need to know more specifics about the case," he said.
Chavez said he wouldn't have run for re-election this year if tests at the time had shown signs of cancer. He also made his most specific comments yet about his movement carrying on without him if necessary.
"Fortunately, this revolution doesn't depend on one man," Chavez said. "Today we have a collective leadership."
Throughout his presidency, though, Chavez has been a one-man political phenomenon, and until the appointment of Maduro he hadn't spoke of any clear successor.
"Chavez is in the short term irreplaceable in terms of leadership and of national impact," said Luis Vicente Leon, a pollster who heads the Venezuelan firm Datanalisis.
Still, he said, Chavez's announcement could help his party's candidates rally support in upcoming state gubernatorial elections on Dec. 16. Leon also said that if Chavez's candidates have a strong showing, it could give his party an added boost to promote constitutional changes to allow Maduro to succeed Chavez without the need for a new election. Such a possibility has not been publicly raised by Chavez's political allies.
Opposition leader Henrique Capriles, who was defeated by Chavez in the presidential vote, wished the president a speedy recovery.
He also bristled at the idea of Maduro being a designated political heir, saying: "When a person leaves his position the public has the last word, because we're in Venezuela and not Cuba."
"Here you can't talk about successors," Capriles told reporters.
Capriles is now running for re-election as governor of Miranda state, and he sidestepped a reporter's question about whether he would consider another presidential bid if new elections are held. "We aren't going around settling accounts," he said. "This is a difficult moment for the government."
Associated Press writers Fabiola Sanchez and Christopher Toothaker in Caracas and Frank Bajak in Bogota, Colombia, contributed to this report.
Ian James on Twitter: http://twitter.com/ianjamesap