Songwriter Kara DioGuardi secretly underwent surgery to remove her ovaries last year (12) after learning she was at risk of developing cancer.

The former American Idol star, who has penned songs for Pink, Christina Aguilera and Kelly Clarkson, was undergoing fertility treatment to start a family with her husband Mike MCCuddy when a medical test revealed bad news about her genetics.

She tells People magazine, "In December 2011 I found out I had a Brca2 gene mutation, which my doctor said meant my chances of developing breast cancer over my lifetime were as high as 80 per cent, and up to 30 per cent for ovarian cancer. My grandmother had breast cancer, and my mother (passed away after she) was diagnosed with ovarian cancer at 50...

"So last December I had prophylactic surgery to remove my uterus, ovaries and fallopian tubes. My doctor told me it could reduce my chances of getting cancer by a significant amount. I took a calculated risk."

DioGuardi immediately hired a gestational surrogate so the couple could still have a baby and one month after the operation, her son, Greyson, was born on 31 January (13).

She says, "When I had the surgery, it was helpful to know that this amazing woman was carrying our child - our last embryo took on the first try - and I was taking care of things to ensure I'd be around to see our son grow up."

The 42 year old is now feeling great and she insists it was all worth it to become a mum: "When I have my son in my arms, I think about how I'd go through it all again - the five years of infertility, the operations - just for him."