Remarkably, Martin Luther King Jr. and Malcolm X, those two titans of modern black history, met face to face only once. You may recall the picture, of the tall, slender Malcolm in his browline glasses and cloth overcoat towering over a cherubic-looking King in the halls of the U.S. Senate. At the beginning of his excellent joint history, “The Sword and the Shield,” Peniel E. Joseph reminds us of the telling details.

King had come to the Capitol to observe the debate over the 1964 Civil Rights Act, the landmark bill outlawing Jim Crow segregation that Southern Democrats were attempting to filibuster. To everyone’s surprise, Malcolm, the fiery nationalist who for years had dismissed such legislative measures and mocked King as an Uncle Tom and a “house Negro,” showed up too, taking a seat in the visitors’ gallery and slipping out of a King news conference so they would bump into each other outside. “Well, Malcolm, good to see you,” King said. “Good to see you,” Malcolm replied, initiating a brief exchange that ended with the joking prediction: “Now you’re going to get investigated.” Then the two men shook hands and smiled for the cameras, providing a rebuke to the media narrative that they were sworn enemies — and a tantalizing glimpse of what might have been if both had survived assassins’ bullets.

Joseph, a historian at the University of Texas at Austin, has made his name studying the Black Power movement and wrote the definitive biography of Stokely Carmichael, the mercurial leader of the Student Nonviolent Coordinating Committee. In turning to King and Malcolm, he ventures into far more densely covered historical territory, populated by hundreds of books, including the magisterial biographies of King by Taylor Branch and David J. Garrow, and of Malcolm by the late black scholar Manning Marable. Inevitably, Joseph retraces some ground that will be familiar to anyone who has read those books, but for the most part he smartly zeros in on the relatively brief period during which King and Malcolm actively influenced each other, even if they had no personal contact. It is a fascinating story, full of subtle twists and turns, that unfolded in three phases.

The first began in 1959 with the airing of a TV documentary on the Nation of Islam, “The Hate That Hate Produced,” narrated by the game show host turned local newsman Mike Wallace. By then, Malcolm Little, a former street hustler nicknamed “Detroit Red,” had converted to Islam in prison and emerged to become the leader of Temple No. 7 in Harlem and the favorite of Elijah Muhammad, the Nation of Islam leader who preached that whites were devils and deployed an armed black militia. The “Hate” film put Malcolm X on the national map and made the press start to pay attention to his scathing attacks on King, the revered hero of the Montgomery bus boycott with his elite Atlanta preacher lineage and impressive divinity school degrees.

For the next four years, Malcolm built his brand with young militants by taking separatist shots at King and his integrationist campaigns, mocking the “Farce on Washington,” and telling psychologist Kenneth Clark in a televised interview after Bull Connor unleashed dogs and fire hoses on the black children of Birmingham, Ala., that King was “the best weapon that the white man, who wants to brutalize Negroes, has ever gotten in this country.” Meanwhile, the specter of Malcolm helped King retain white support and forced him to up his messaging game. As Joseph puts it, the more Malcolm “ridiculed and challenged King publicly, the more pains King took to emphasize the strength, power and discipline of nonviolent resistance.”

The second phase started with the assassination of President John F. Kennedy and Malcolm’s controversial response that it represented “chickens coming home to roost” for white America, which gave the jealous Elijah Muhammad a pretext to begin pushing his mediagenic disciple out of the Nation of Islam. Far from diminishing Malcolm, the break liberated him. On two widely publicized trips abroad, Malcolm was welcomed by heads of state and universities across the Middle East, Africa and Europe as “black America’s unofficial prime minister,” in Joseph’s description, just as King was about to be awarded the Nobel Peace Prize.

Once on a more equal footing of international respect as well as verbal brilliance, the two men began to take tentative steps toward a rapprochement. The month before the Selma-to-Montgomery march in Alabama in 1965, Malcolm accepted an invitation to speak at Selma’s Brown Chapel AME Church along with Coretta King. Her husband was in jail for protesting earlier in the week, but Malcolm passed along his regards to Coretta, adding a shrewd acknowledgment of their symbiotic relationship. “Mrs. King, will you tell Dr. King that I’m sorry I won’t get to see him,” Malcolm said. “. . . I want him to know that I didn’t come to make his job more difficult. I thought that if the white people understood what the alternative was that they would be willing to listen to Dr. King.” Hearing that, King signaled his intention to reach out to Malcolm after the Selma march.

By that time, Malcolm was dead from a gangland-style hit at the Audubon Ballroom north of Harlem, carried out by three Nation of Islam gunmen. But in Joseph’s telling, that was only the beginning of the third phase of the story. From then on, King grew increasingly Malcolm-like in his analysis and condemnation of American injustice and hypocrisy, denouncing the Vietnam War, embracing the fight against economic inequality and sympathizing with the rage behind the urban race riots that Malcolm had foreseen. (On the day of their 1964 meeting, Malcolm told reporters that he supported the Civil Rights Act but that “enforcing it would bring a civil war to the South and a race war to the North.”)

Joseph is not alone in this overdue focus on the “radical King” of his last three years, which has been emphasized by scholars such as Cornel West and Michael Eric Dyson and in the recent HBO documentary “King in the Wilderness.” But it is eerie and illuminating to ponder the role that Malcolm’s ghost played in King’s last act, until, as James Baldwin put it in a 1972 Esquire essay on the two men, “by the time each met his death, there was practically no difference between them.”

Along with the “sword” and “shield” metaphors of the book’s title, Joseph has another memorable description of the contrast between the two men’s styles and roles. Malcolm was “black America’s prosecuting attorney,” indicting white society for crimes against black people, he writes, while King was “the nation’s chief defense attorney on both sides of the color line.” But two moving sentences in his epilogue capture what the two shared in common and why they are so relevant today. “Martin and Malcolm loved black folk sincerely and unapologetically,” Joseph writes, and “Malcolm and Martin continue to offer the world powerful legacies of radical social and political transformation.” That is why King and Malcolm remain the two spiritual saints of black America, and why their stories, too, will be worth revisiting for as long as authors and artists find new ways of telling them.

The Sword and the Shield

The Revolutionary Lives of Malcolm X and Martin Luther King Jr.

By Peniel E. Joseph

373 pp. $30