Sen. John F. Kerry (D-Mass.) announced yesterday that he will undergo prostate cancer surgery early today. He and his doctor said his chances for full recovery are excellent and the operation will not significantly hinder his campaign for the Democratic presidential nomination.

Patrick Walsh, chief of urology at The Johns Hopkins Hospital in Baltimore, who will perform the two-hour operation to remove the prostate, said the cancer was discovered early enough to give Kerry a 90 percent chance of emerging from the operation free of cancer. Walsh said there is a less than 1 percent chance that the senator will suffer urinary incontinence and a 90 percent chance that he will have no problems with sexual function, the two most common complications of prostate surgery.

Speaking to reporters yesterday afternoon, Kerry said, "I really feel very lucky, and the reason I feel lucky is that I'm going to be cured."

The surgery comes as Kerry and other Democratic presidential candidates have engaged in intense competition to raise money for their candidacies, hire staff and build their organizations in key early states such as Iowa and New Hampshire. But with those caucuses and primaries still 11 months away, and doctors predicting Kerry's full recovery, the operation is not expected to cause a significant disruption to his campaign.

Kerry is the second Democrat with his eye on the White House to undergo major surgery this year. Sen. Bob Graham (D-Fla.), whose advisers say is close to setting up a presidential campaign committee, is recuperating from heart surgery.

Although Kerry was upbeat about his prognosis, he was forced to explain yesterday why he recently told the Boston Globe that he did not have any medical problems after being asked two explicit questions about his health. Asked today why he was not truthful at the time and whether that reflected on his integrity as a possible president, Kerry said he answered the way he did because his doctor was away at the time and because he had not told all members of his family about the cancer.

"I believed that members of my family deserved to learn, not reading the newspaper, but deserved to learn from me," he said. "I thought my family came first."

Kerry, 59, predicted he will be back at work next week and plans to return to campaigning within a matter of weeks. Walsh said that was a reasonable expectation, although some men who have undergone prostate surgery require more time to regain their energy.

Other politicians and government officials have faced prostate cancer, including former Republican senator Robert J. Dole, former New York mayor Rudolph W. Giuliani, FBI Director Robert S. Mueller III and retired Gen. H. Norman Schwarzkopf Jr. Dole, who had prostate surgery in 1991, became the Republican presidential nominee in 1996. Giuliani, who was diagnosed with prostate cancer in 2000, decided not to run for Senate against Hillary Rodham Clinton.

Kerry's cancer was detected during a routine physical exam in December, just as the senator was beginning his presidential campaign. After a blood test revealed an elevated PSA level, Kerry had a second test performed at Massachusetts General Hospital, and that too showed an elevated level.

A biopsy was performed Dec. 20 and Kerry learned the day before Christmas that the biopsy showed some cancer of the prostate. In January, he underwent a full body bone scan and CAT scan, which showed that the cancer had not spread to other parts of his body.

After consulting with his regular physician, Gerald J. Doyle of Boston, with Walsh and with others, Kerry elected to have his prostate removed rather than another course of treatment.

Sen. John F. Kerry's cancer was detected in a routine physical.