BRUNSWICK, Maine — U.S. Sen. Angus King underwent successful surgery on Friday for prostate cancer, his wife, Mary Herman, announced at about 2 p.m.

“I am so happy to say that Angus’s surgery was a success and aside from being a bit sore — and boring us all with bad prostate jokes — he’s feeling just fine and already eager to get back to work,” Herman said in a release.

King, who turned 71 in March, announced Monday he would undergo surgery to remove prostate cancer. It is the second occurrence of cancer in the former Maine governor, who was diagnosed with malignant melanoma, an aggressive form of skin cancer, 40 years ago.

King’s physicians discovered the prostate cancer during an annual physical in April. He said the doctors had found the cancer in an early stage. He said it would not affect his intention to run for re-election.

On Friday, Herman thanked the doctors, nurses, staff and administration at Massachusetts General Hospital in Boston, where Dr. Douglas M. Dahl performed King’s surgery, as well as well-wishers in Maine.

“Your kind words have been overwhelming, and our entire family is grateful to come from a state that cares so much for the man we love,” she said.