Texas Democratic gubernatorial candidate Wendy Davis reveals in a new campaign memoir that she terminated two pregnancies for medical reasons in the 1990s, including one where the fetus had developed a severe brain abnormality.

Davis writes in "Forgetting to be Afraid" that she had an abortion in 1996 after an exam revealed that the brain of the fetus had developed in complete separation on the right and left sides. She also describes terminating an earlier ectopic pregnancy, in which an embryo implants outside the uterus.

Davis disclosed the terminated pregnancies for the first time since her nearly 13-hour filibuster last year over a tough new Texas abortion law.

Both pregnancies happened before Davis, a state senator from Fort Worth, began her political career and after she was already a mother to two young girls. She writes that the ectopic pregnancy happened in 1994 during her first trimester. Such pregnancies are typically terminated because the fetus generally cannot survive and the mother's life could be in danger, but Davis noted that in Texas, it's "technically considered an abortion, and doctors have to report it as such."

Davis said she and her former husband, Jeff, wound up expecting another child in 1996 after they decided to stop taking birth-control measures. During her second trimester, Davis said she took a blood test that could determine chromosomal or neural defects, which doctors first told her didn't warrant any concern. After a later exam revealed the brain defect, Davis said she sought out opinions from multiple doctors, who told her the baby would be deaf, blind and in a permanent vegetative state if she survived delivery.

"I could feel her little body tremble violently, as if someone were applying an electric shock to her, and I knew then what I needed to do," Davis writes. "She was suffering."

She goes on to writes that an "indescribable blackness followed" the second failed pregnancy. She says the loss left her forever changed.

Davis spokesman Zac Petkanas called the book "a bold and brave memoir that is less about politics than it is a stunningly frank personal story."

Davis catapulted to national Democratic stardom after her filibuster temporarily delayed passed of sweeping new abortion restrictions. She is now running for governor against Republican Attorney General Greg Abbott, who is a heavy favorite to replace Republican Gov. Rick Perry next year.

Davis' filibuster in June 2013 set off a chaotic scene in the Texas Capitol that extended past midnight. Thousands of people packed watched a livestream online, with President Barack Obama at one point tweeting, "Something special is happening in Austin tonight."

In the book, Davis read testimony during her filibuster about a woman who had had an abortion after learning her daughter would be born with a terminal illness. She said the story hit a little too close to home.

"My voice and hands shook; I wiped tears from my eyes. It was a tale of tremendous sadness, heartache, grief, and one that was so hauntingly familiar I could barely speak it out loud," Davis wrote. "It could have been my story. The story of Tate and what Jeff and I had gone through."

At one point during the filibuster, Davis said she almost felt compelled to talk about her failed pregnancies.

"But knowing such an unexpected and dramatically personal confession would overshadow the events of the day, I knew the time wasn't right," she wrote.