WASHINGTON — Hillary Clinton said in her new memoir that she sought the release of US Army Sergeant Bowe Bergdahl, but recognized that negotiating with his Taliban captors would be “hard to swallow” for Americans.

Bergdahl was released last weekend and President Barack Obama, who Hillary Clinton is widely assumed to want to succeed in office, has come under fire for agreeing to a prisoner exchange.

The former secretary of state’s long-awaited book, Hard Choices, is set for a June 10 release, but CBS News said on Thursday that it had somehow purchased a copy at a bookstore.

The book promises a treasure trove of details about her tenure as secretary of state, and Clinton launches a book tour next week that is widely interpreted as a dry run for the 2016 presidential campaign.

In passages that directly relate to today’s headlines, Clinton addresses the State Department’s various attempts to free Bergdahl, who was released into US hands on Saturday in an exchange that saw five Taliban leaders transferred out of the Guantanamo military prison.

“In every discussion about prisoners, we demanded the release of Army Sergeant Bowe Bergdahl, who had been captured in 2009. There would not be any agreement about prisoners without the sergeant coming home,” she wrote, according to CBS.

“I acknowledged, as I had many times before, that opening the door to negotiations with the Taliban would be hard to swallow for many Americans after so many years of war.”

The swap that freed Bergdahl has ignited a political firestorm in Washington, where critics of the exchange say President Barack Obama badly erred in releasing five hardened Taliban officials.

Former senior administration officials told the Washington Post that Clinton opposed the prisoner swap when it was first considered in 2011, because it did not include a travel ban on the Taliban after they would be transferred to Qatar.

Last weekend’s deal included Qatar’s pledge of a one-year travel ban.

Clinton offered measured support for the controversial swap, telling an audience at a Colorado event Monday that “I certainly hope they (Qatar) follow through on the assurances they provided.”