A city council candidate dropped out of the race Friday after it was disclosed that he posted comments to a white supremacist Internet bulletin board more than 4,000 times.

Doug Hanks (search) said the postings were fictional and designed to win white supremacists' trust as he researched a novel he was writing. He said the book was also meant to appeal to white supremacists (search).

"I needed information for the book and some other writings I was doing," Hanks told The Associated Press on Friday. "I did what I thought I needed to do to establish myself as a credible white nationalist."

Hanks had filed papers seeking the Republican nomination for one of four at-large council seats, but formally withdrew Friday, said county elections director Michael Dickerson.

Hanks' postings over the past three years were first reported by The Rhinoceros Times, a weekly newspaper. In one June 1 posting, he said blacks should be treated like "rabid beasts."

Hanks said his self-published novel, called "Patriot Act," takes themes from "The Turner Diaries" — the racist novel believed to have inspired Oklahoma City bomber Timothy McVeigh (search).

"I saw how successful these 'Turner Diaries' had been and that was the path to take," he told the AP. White supremacists, he said, "have more of a tendency to word of mouth, to say, 'Hey, you ought to pick this up.'"

Republican Mayor Pat McCrory (search) condemned Hanks.

"He's a man of total inner hatred in both his heart and soul, and it doesn't matter what party he's in," McCrory said.