The pop icon’s memoir, ‘The Woman in Me,’ is out now

Britney Spears is looking back on a painful experience.

In her new memoir The Woman in Me, Spears shares details about the medical abortion she had after she became pregnant with Justin Timberlake’s baby when they were dating.

“It was important that no one find out about the pregnancy or the abortion, which meant doing everything at home,” Spears, now 41, writes. “We didn’t even tell my family. The only person who knew besides Justin and me was Felicia [Culotta, Spears’ former assistant], who was always on hand to help me. I was told, ‘It might hurt a little bit, but you’ll be fine.'”

She writes of the experience: “On the appointed day, with only Felicia and Justin there, I took the little pills. Soon I started having excruciating cramps. I went into the bathroom and stayed there for hours, lying on the floor, sobbing and screaming.”

Britney Spears, The Woman In Me Book Cover

The Woman in Me by Britney Spears.

At the time, Spears recalls, Timberlake, now 42, tried to comfort her.

“Justin came into the bathroom and lay on the floor with me,” she writes. “At some point he thought maybe music would help, so he got his guitar and he lay there with me strumming it.”

A rep for Timberlake did not immediately respond to PEOPLE’s request for comment.

Singers Britney Spears and Justin Timberlake in the audience at the 2000 MTV Music Video Awards in New York

DAVE HOGAN/GETTY

PEOPLE first confirmed last week that Spears wrote of the pregnancy with Timberlake and following abortion in her memoir.

The “Toxic” singer was 17 when she began dating the then-18-year-old *NSYNC singer in 1999, and they dated until 2002.

“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 of the pregnancy in the book. “But 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.”

Justin Timberlake & Britney Spears during Super Bowl XXXVI - Britney Spears & Justin Timberlake Host Super Bowl Fundraiser at Planet Hollywood Times Square at the Planet Hollywood Times Square in New York City, NY

Justin Timberlake and Britney Spears in February 2002. DENISE TRUSC / GETTY

She writes in the book: “If it had been left up to me alone, I never would have done it. And yet Justin was so sure that he didn’t want to be a father.”

Spears writes of her experience undergoing the abortion: “To this day, it’s one of the most agonizing things I have ever experienced in my life.”

After Spears and Timberlake split in 2002, she went on to become a mother, welcoming two sons — Sean Preston, 18, and Jayden James, 17 — with her second husband, Kevin Federline.

Spears released her much-anticipated memoir on Tuesday, through Gallery Books, an imprint of Simon & Schuster.

“It is finally time for me to raise my voice and speak out, and my fans deserve to hear it directly from me,” Spears told PEOPLE in an email interview for last week’s exclusive cover story. “No more conspiracy, no more lies — just me owning my past, present and future.”

Britney Spears PEOPLE exclusive

Britney Spears on the cover of PEOPLE.BRITNEY BRANDS