A  first-rate controversialist, Norman Mailer was delighted when his pal William F. Buckley stumbled into a media fracas in 1965.

That spring, Buckley — the country's brashest conservative voice and a calculating provocateur in his own right — gave a speech supporting police who had recently terrorized civil rights marchers in Selma, Ala. The press coverage was predictably scathing.

"Every paper drew blood," Kevin M. Schultz says in "Buckley and Mailer: The Difficult Friendship That Shaped the Sixties."

For once, Mailer watched from the sidelines. But he couldn't let the occasion pass without comment. "I write you this letter in great envy," he commiserated. "I think you are going finally to displace me as the most hated man in American life."

Public figures who are successful and self-important enough to believe that their every jotting ought to be preserved for the ages are a boon to historians. Buckley and Mailer were two such men. Judging by this ardently researched book, both seem to have saved every letter they wrote or received, and their lively epistolary relationship forms the core of this perceptive dual portrait.

It was September 1962 — "the sweet spot of America's last great age of public intellectuals," Schultz says — when Mailer, 39, and Buckley, 36, had their first encounter. It was a staged affair. The men were strangers when they appeared together in Chicago as the featured combatants in a political debate. "The Conservative Mind clashes with the Hip Mind," said the promotional posters.

There were tough words that night, but soon the men were dining together at Buckley's Connecticut home. Superficially, they didn't have much in common.

Two years after stabbing his then-wife, Mailer was infamous, and critics found his fiction increasingly uninspired. But he had other concerns, Schultz notes: In 1959's "Advertisements for Myself" he exhorted fellow political lefties to join him in "making a revolution in the consciousness of our time." That nobody knew what this meant was beside the point.

Buckley, meanwhile, was a hero to right-leaning Americans, the author of a popular book excoriating Ivy League orthodoxy and the founder of National Review, a magazine that defended what it held to be traditional values.

What united them? Although they wanted to pull the nation in opposite directions, Mailer and Buckley shared a deep dissatisfaction with the ideas and assumptions that were shaping American politics. On this front, Schultz does a superb job of contextualizing their differing positions on the Cold War, the future of a great American metropolis (both men ran for New York City mayor in the '60s) and the chaotic 1968 Democratic National Convention.

But what really drives this book are their spirited letters. With help from the U.S. Postal Service, they discussed Buckley's big vocabulary, Mailer's outsized persona and a host of weightier matters. Fittingly, when their relationship cooled for a time, it was discussed in one of these exchanges. As Schultz tells it, they'd been planning to get together for dinner, but Mailer scotched the idea, feeling that they were too far apart on the era's defining issue. "I'm not so certain we can have it now, with Viet Nam to pass the wine. … That's the trouble with bad wars," he wrote. "They spoil the continued existence of difficult friendships."

Kevin Canfield is a writer and critic in New York City.