Credit: Gilbert Carrasquillo/FilmMagic

Ben Stiller says he survived deadly prostate cancer two years ago because of early detection – and now he wants to spread the word about getting tested.

The 50-year-old actor said in an interview on The Howard Stern Show Tuesday morning that he was diagnosed with prostate cancer at age 48.

“It came out of the blue for me,” Stiller said. “I had no idea.”

Although Stiller says he had no history of prostate cancer in his family, his doctor suspected the cancer due to a Prostate-Specific Antigen (PSA) test at a yearly physical.

“If I hadn’t gotten the test, my doctor started giving it to me at 46, I still wouldn’t know,” he said.

Stiller added, “I wanted to talk about it because of the test, because I feel like the test saved my life.”

Stiller’s doctor gave him PSA test and found that his levels were high. Although he wasn’t immediately concerned, the doctor re-administered the test six months later and found the PSA had gone up even more.

“After the second time, I started to get a little worried,” Stiller said.

The actor went through a series of tests, including an MRI and biopsy, to determine if he definitely had prostate cancer and ended up having surgery to remove his prostate for his intermediately-aggressive cancer six weeks later.

“I was diagnosed on Friday the 13th, then I had until Aug. 23 to get ready for the surgery. So I just had the summer to hang out and think about it,” he says.

He even reached out to some of his A-list pals, including Robert De Niro, who previously battled prostate cancer.

Unlike De Niro, Stiller opted to stay quiet about his diagnosis at first.

“At first, I didn’t know what was going to happen,” he says. “I was scared. The one thing that it does is it just stops everything in your life when you get diagnosed with cancer because you can’t plan for a movie – you don’t know what’s going to happen.”

However, the actor wants to open up about his experience now in order to help others.

“The controversy about the test is that once you get treatment for prostate cancer, things can happen: incontinence, impotence,” he said.

“It’s the second most deadly cancer, but it’s also one of the most survived cancers, if it’s detected early.”