Former US president Jimmy Carter says recent liver surgery has shown he has cancer, and it has spread.

The 39th president, now aged 90, underwent an initially successful operation earlier this month to remove a "small mass".

"That procedure revealed that I have cancer that now is in other parts of my body," he said in a brief written statement.

"I will be rearranging my schedule as necessary so I can undergo treatment.

"A more complete public statement will be made when facts are known, possibly next week."

The Nobel Peace Prize winner's two sisters, brother and father all died from pancreatic cancer.

The Georgia native will be treated at Emory University Hospital in Atlanta.

US president Barack Obama was among those who voiced their support, wishing his predecessor a "fast and full recovery".

"Jimmy, you're as resilient as they come, and along with the rest of America, we are rooting for you," he said in a statement.

Loading

In May, Mr Carter cut short a trip to Guyana after he fell ill. He was flown back to Atlanta, where he attended a public event the next day.

Mr Carter was in the White House from 1977 to 1981.

His term in office was perhaps best known for the Iran hostage crisis, which saw 52 Americans held in Tehran for 444 days following the Islamic Revolution.

Mr Carter's failure to secure their release, compounded by a failed military rescue attempt, dogged his presidency and scuttled his bid for a second term.

The hostages were only released once Ronald Reagan came to office.

Groundswell of support comes for Carter

But Mr Carter's reputation is much stronger today than it was when he left office.

Reaching a peace deal between Israel and Egypt is now recognised as the zenith of his presidency and a major diplomatic achievement.

But his work after leaving the White House has also been widely praised.

He has been extremely active as an ex-president, working as an elections monitor and lobbying for health campaigns via the Carter Centre, which he founded in 1982.

He has participated in election monitoring in Mexico, Peru, Nicaragua, Venezuela, and East Timor, and in 2003 travelled to Cuba for a historic, face-to-face meeting with long-time communist leader Fidel Castro.

He was the recipient of the 2002 Nobel Peace Prize for his tireless efforts to promote social and economic justice.

News of his illness prompted a groundswell of support from well-wishers.

"We hope for his full recovery and return to his inspiring work," Apple chief executive officer Tim Cook said.

Democratic national committee chair Debbie Wasserman Schultz added: "Dems across the country are pulling for you."

There are four living former US presidents: Mr Carter, George HW Bush, Bill Clinton and George W Bush.

AFP