Former president Barack Obama called America a “racist society,” and said the anti-black racism is so entrenched that it infects both blacks and whites.

That’s what Pulitzer Prize-winning author David Garrow claims in his forthcoming biography “Rising Star: The Making of Barack Obama.”

Garrow said Obama and his friend Robert Fischer wrote hundreds of pages for a book when they were in law school. The book was never published, but reportedly captured Obama’s thoughts on how racist American society is.

Garrow told the Jamie Weinstein Show (audio below; discussion of Obama book starts 46 minutes in) that Obama may not have been elected president if his condemnation of “racist America” had been made public before his election.

Melania wins damages for libel over bogus ‘call girl’ story: See newspaper’s groveling apology

Garrow, who conducted more than 1,000 interviews for his biography, claimed Obama wrote the following in his unpublished book as a Harvard Law School student:

Racism against African-Americans continues to exist throughout American society, an admittedly racist culture. Precisely because America is a racist society, we cannot realistically expect white America to make special concessions toward blacks over the long haul. The greatest testimony to the force of racist ideology in American culture is that it infects not only the mind of whites, but the minds of blacks as well.

Garrow, who won the 1987 Pulitzer Prize for his biography of Martin Luther King Jr., said he believes the public will be surprised at Obama’s militant views on anti-black racism.

“Barack and his closest friend in the early 1990s, when they were in law school, wrote several hundred pages of a proposed book manuscript that was never published,” Garrow said. “Particularly the 140 pages or so of that manuscript that are about race give significant insight into Barack’s thinking when he was leaving law school and about to enter into public life in Illinois.”

Garrow said Obama’s views might have derailed his presidential election if they had been made public.

“Had some Republican opposition researcher [discovered the book manuscript] … there are multiple things that could have been used to Guinier him,” Garrow said, referencing Lani Guinier, a nominee for assistant attorney general for civil rights in 1993. Bill Clinton had nominated Guinier, but later withdrew his nomination after inflammatory racial statements she had made in law school surfaced.

Barack Obama made history as the first African-American president of the United States. While Obama is hailed as an icon and a champion of black America, he’s half-white and was raised by his white mom Ann Dunham and his white grandparents after his mom and Kenyan dad (Barack Obama Sr.) divorced in 1964, when Barack was 3 years old.

Moms furious that middle school forces children to learn about Islam but not Christianity

When Obama was elected president in 2008, he won a record 54% of young white votes in “racist America.” Before that, no Democratic presidential nominee had won more than 45% of young whites for three decades.