Throughout his presidential campaign, Donald Trump has waved around his book, The Art of the Deal, to bolster his image as a smooth negotiator and skilled leader.

Now, Tony Schwartz—the man who says he actually wrote the book and is listed as its coauthor—is publicly expressing remorse for promoting the image of a man he describes as a “sociopath.”

“I put lipstick on a pig,” he told Jane Mayer, writing for The New Yorker. “I feel a deep sense of remorse that I contributed to presenting Trump in a way that brought him wider attention and made him more appealing than he is."

Schwartz continued: “I genuinely believe that if Trump wins and gets the nuclear codes there is an excellent possibility it will lead to the end of civilization.”

According to Mayer, Schwartz has a unique window into Trump’s life. “Starting in late 1985,” she writes, “Schwartz spent 18 months with Trump—camping out in his office, joining him on his helicopter, tagging along at meetings, and spending weekends with him at his Manhattan apartment and his Florida estate.”

Schwartz attested to Trump’s stunningly short attention span, telling Mayer, “Trump has been written about a thousand ways from Sunday, but this fundamental aspect of who he is doesn’t seem to be fully understood. It’s implicit in a lot of what people write, but it’s never explicit—or, at least, I haven’t seen it. And that is that it’s impossible to keep him focused on any topic, other than his own self-aggrandizement, for more than a few minutes, and even then.”

Schwartz went on to say, “He lied strategically. He had a complete lack of conscience about it.” Since most people are “constrained by the truth,” Trump’s indifference to it “gave him a strange advantage.”

Perhaps most revealing is an excerpt from an entry in a journal Schwartz kept while he was working on The Art of the Deal. “All he is is ‘stomp, stomp, stomp’—recognition from outside, bigger, more, a whole series of things that go nowhere in particular,” he wrote in October 1986. A few days later he noted, “the book will be far more successful if Trump is a sympathetic character—even weirdly sympathetic—than if he is just hateful or, worse yet, a one-dimensional blowhard.”

Separately, Schwartz told Good Morning America on Monday, “You know, it’s a terrifying thing. I haven’t slept a night through since Donald Trump announced for president because I believe he is so insecure, so easily provoked and not—not particularly—nearly as smart as people might imagine he is.”

Mayer says Schwartz “has decided to pledge all royalties from sales of The Art of the Deal in 2016 to pointedly chosen charities: the National Immigration Law Center, Human Rights Watch, the Center for the Victims of Torture, the National Immigration Forum, and the Tahirih Justice Center.”

But Schwartz proclaimed, “I’ll carry this until the end of my life. There’s no righting it. But I like the idea that, the more copies that The Art of the Deal sells, the more money I can donate to the people whose rights Trump seeks to abridge.”