Britney Spears reveals a personal experience she has kept private for two decades in her upcoming memoir.
During her relationship with Justin Timberlake, Spears became pregnant by the singer and had an abortion, she writes in a book excerpt published by People.
"It was a surprise, but for me, it wasn't a tragedy. I loved Justin so much. I always expected us to have a family together one day. This would just be much earlier than I'd anticipated," Spears writes in her book, "The Woman in Me."
"But," she writes, "Justin definitely wasn't happy about the pregnancy. He said we weren't ready to have a baby in our lives, that we were way too young."
CNN has not yet been able to independently review "The Woman in Me."
A representative for Timberlake did not respond to CNN's request for comment.
In the excerpt, Spears writes about how she felt conflicted at the time
"If it had been left up to me alone, I never would have done it," she writes. "And yet Justin was so sure that he didn't want to be a father."
"To this day, it's one of the most agonizing things I have ever experienced in my life," she adds.
Timberlake and Spears dated from 1999 until 2002.
Spears later married dancer Kevin Federline and had two sons, Sean Preston, 18, and Jayden James, 17, prior to her and Federline divorcing in 2007.
Timberlake married actress Jessica Biel in 2012 and the pair are the parents of two young sons, Silas and Phineas.
"The Woman in Me" publishes on Oct. 24.