ATLANTA — Former President Jimmy Carter announced on Wednesday that he had been given a diagnosis of a spreading cancer that was detected by recent liver surgery.

“I will be rearranging my schedule as necessary so I can undergo treatment,” Mr. Carter, 90, said in a statement. “A more complete public statement will be made when facts are known, possibly next week.”

The announcement, which revealed few details about Mr. Carter’s condition, came nine days after doctors at Emory University Hospital in Atlanta performed an elective procedure that removed “a small mass” from his liver. At the time, the former president’s office said that “the prognosis is excellent for a full recovery.”

Mr. Carter, who left the White House in 1981 and has enjoyed the longest post-presidency in American history, has an extensive family history of cancer. His father and three siblings all died of pancreatic cancer, a disease that was also found in his mother. Mr. Carter gave no indication on Wednesday whether his pancreas had been affected, and his spokeswoman declined to elaborate beyond the former president’s three-sentence statement.