Hillary Clinton blames Sen. Bernie Sanders for doing “lasting damage” to her campaign and “paving the way” for President Trump to denigrate her as “Crooked Hillary,” according to newly released excerpts from upcoming book.

“When I finally challenged Bernie during a debate to name a single time I changed a position or a vote because of a financial contribution, he couldn’t come up with anything,” Clinton writes in her upcoming book “What Happened.”

“Nonetheless, his attacks caused lasting damage, making it harder to unify progressives in the general election and paving the way for Trump’s ‘Crooked Hillary’ campaign.”

In the 500-page tell-all, out Sept. 12, the former secretary of state claims she wanted to go harder against the self-described socialist, but President Obama advised her not to.

“Throughout the primaries, every time I wanted to hit back against Bernie’s attacks, I was told to restrain myself,” she writes.

“My team kept reminding me that we didn’t want to alienate Bernie’s supporters. President Obama urged me to grit my teeth and lay off Bernie as much as I could. I felt like I was in a straitjacket.”

She also takes aim at Sanders’ “Bernie Bro” supporters.

“Some of his supporters, the so-called Bernie Bros, took to harassing my supporters online. It got ugly and more than a little sexist,” she writes.

The excerpts were revealed online by pro-Clinton social media accounts.