By Gil Aegerter and Gael Fashingbauer Cooper, Staff Writers, NBC News

(NBC) -- Angelina Jolie says she has undergone a preventive double mastectomy after being told that she had an 87 percent risk of breast cancer, along with a 50 percent risk of ovarian cancer.

In an article published in the opinion section of Tuesday's New York Times, Jolie said her decision was informed by her mother's long fight against cancer. Marcheline Bertrand died in 2007 at age 56.

Jolie said she hoped that other women would find encouragement from her story.

"I choose not to keep my story private because there are many women who do not know that they might be living under the shadow of cancer," Jolie said in the Times article. "It is my hope that they, too, will be able to get gene tested, and that if they have a high risk they, too, will know that they have strong options."

Jolie, an actress and activist, said she carries a gene, BRCA1, that increases the risk of breast and ovarian cancer.

According to Jolie and a fact sheet from the Cancer Institute at Stanford Medicine, women with the BRCA1 gene have an average of a 65 percent lifetime risk for breast cancer, along with heightened risk of the cancer at an early age. Jolie is 37.

Jolie said three months of medical procedures that the mastectomies involved were completed April 27. She said the surgery included implants to reconstruct her breasts.

She said that her partner, Brad Pitt, was present for the surgeries. She said her six children, who range in age from 11 to 4, saw nothing that made them uncomfortable.

"They can see my small scars and that's it," Jolie wrote. "Everything else is just Mommy, the same as she always was.

And they know that I love them and will do anything to be with them as long as I can."

Other famous women with the BRCA1 or BRCA2 genes have undergone preventive double mastectomies, including reality star Sharon Osbourne, wife of rocker Ozzy.

"I've had cancer before and I didn't want to live under that cloud," Osborne said in an interview last fall.

In January, Miss America contestant Allyn Rose, representing the District of Columbia, announced that she carries another genetic mutation -- not BRCA1 or BRCA2 -- and plans to have a double mastectomy after her year of serving as Miss D.C.

Friends and fans were quick to support Jolie via messages on Twitter. Actress Marlee Matlin called her "brave, honest (and) strong." And "Veronica Mars" star Kristen Bell praised Jolie's article as "admirable."

READ MORE | Angelina Jolie's editorial in the New York Times