AP

AUSTIN, Texas (AP) — Texas Democratic gubernatorial candidate Wendy Davis, who became a national political sensation by delaying her state's tough new restrictions on abortion, discloses in her upcoming memoir that she had an abortion in the 1990s after discovering that the fetus had a severe brain abnormality.

In Forgetting to be Afraid, Davis also writes about ending an earlier ectopic pregnancy, in which an embryo implants outside the uterus. Davis says she considered revealing the terminated pregnancies during her nearly 13-hour speech — as part of a parliamentary maneuver — on the floor of the Texas Senate last summer — but decided against it, saying "such an unexpected and dramatically personal confession would overshadow the events of the day."

The Associated Press purchased an early copy of the book, which goes on sale Tuesday.

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. Davis catapulted to national Democratic stardom after her filibuster temporarily delayed passed of sweeping new abortion restrictions. She's now running for governor against Republican Attorney General Greg Abbott, who is heavily favored to replace Republican Gov. Rick Perry next year.

The second pregnancy happened in 1996. Davis writes that during her second trimester she took a blood test that could determine chromosomal or neural defects, which doctors first told her didn't warrant concern. But a later exam revealed that the brain of the fetus had developed in complete separation on the right and left sides, Davis says. Doctors told her the baby would be deaf, blind and in a permanent vegetative state if she survived delivery, she writes.

"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 say that an "indescribable blackness followed" the pregnancy and that the loss left her forever changed.

The ectopic pregnancy happened in 1994, and terminating it was considered medically necessary, Davis writes. Such pregnancies generally aren't considered viable, meaning the fetus can't survive, and they can endanger the mother's life. But Davis writes that in Texas, it's "technically considered an abortion, and doctors have to report it as such."

Davis' filibuster in June 2013 — in which she stood for hours on the floor of the Texas Senate to speak against the anti-abortion legislation — set off a chaotic scene in the Texas Capitol that extended past midnight. Thousands of people watched it online, with President Barack Obama at one point tweeting, "Something special is happening in Austin tonight."

Davis' filibuster only temporarily delayed the restrictions, which passed overwhelmingly when Perry called a special legislative session. The measure requires doctors who perform abortions to obtain admitting privileges at nearby hospitals and mandates that clinics upgrade their facilities to hospital-level operating standards. A federal judge in Austin last month blocked a portion of the law that would have left Texas with only seven abortion facilities statewide.

Anti-abortion groups, including those that have attacked Davis' candidacy, expressed sympathy for the tough choice Davis confronted with the second terminated pregnancy but said they hoped all decisions end in choosing to continue a pregnancy.

"That's an incredibly difficult position for anyone to find themselves in. While our heart goes out for the decision she had to make, again, still the value of life is precious," Texans Right to Life spokeswoman Melissa Conway said Friday night.

Abbott spokesman Matt Hirsch did not return messages seeking comment.

Cecile Richards, president of Planned Parenthood and the daughter of Ann Richards, Texas' last Democratic governor, praised Davis' "unwavering courage"

"We are grateful to her for sharing her story and shining a light on a subject that is too often hidden in the shadows of shame and stigma by people like Greg Abbott and his allies," Richards said.