Venezuelan President Hugo Chavez made a surprise return from Cuba today more than two months after surgery for cancer that threatens to end his 14-year rule of the South American OPEC member.

The 58-year-old socialist leader underwent a six-hour operation in Cuba on 11 December.

He had not been seen or heard in public since then until photos were published of him on Friday.

"We have arrived back in the Venezuelan fatherland. Thanks, my God! Thanks, my beloved people! Here we will continue the treatment," Mr Chavez said via Twitter.

Aides confirmed the news.

There had been speculation Mr Chavez was unwell enough to travel despite wanting to return to his homeland for continued treatment.

He was first diagnosed with cancer in mid-2011.

But Vice-President Nicolas Maduro said Mr Chavez flew in at about 2.30am local time from Havana and was in a military hospital in Caracas.

Mr Chavez's overnight return will thrill supporters in the nation of 29 million people.

"I remain attached to Christ and trusting in my nurses and doctors. Onwards to victory forever! We will live and we will conquer!" Mr Chavez tweeted, adding his thanks to Cuban leaders Raul and Fidel Castro for his treatment there.

Ministers were jubilant, one singing "He's back, he's back!" live on state TV. "We're so happy," Mr Maduro said.

Given that ministers said he wanted to return when he was well enough to travel, Mr Chavez's arrival implied some improvement in his condition, at least enough to handle a flight of several hours.

But aides have emphasised in recent days his state remains "complex".

Mr Chavez's operation in Havana was his fourth for the cancer first detected in his pelvic area in June 2011.

On Friday, the government published photos showing him lying in hospital. Officials said he was breathing through a tracheal tube and struggling to speak.

Mr Chavez's tweets today were his first since travelling to Cuba for the surgery in December.