Los Angeles: Former 'How I Met Your Mother' star Cobie Smulders has revealed that she battled ovarian cancer when she was 25-year-old.

The 33-year-old actress made the revelation in an interview for Women's Health.

"I had tumors on both ovaries, and the cancer had spread into my lymph nodes and surrounding tissues," Smulders said.

Cobie Smulders reveals her battle with ovarian cancer at 25
Cobie Smulders. Pic/Santa Banta

For the next couple of years, she underwent many surgeries to remove the cancerous tissue in her body, which then left her with one third of an ovary. Being told by doctors who treated her that she would never be able to get pregnant naturally, Smulders in fact has two children with her actor husband Taran Killam.

"I don't think I'll ever feel like I'm cancer-free. Now that I'm five years out, I'm trying to think of it as a positive thing and what can I learn from it. And if I can create more awareness, I'll do it," she said.