President Obama, left, and Defense Secretary Robert Gates, center, walk to the Rose Garden with, from to back, Army Gen. Martin Dempsey, Adm. James Winnefeld and Gen. Ray Odierno on May 30. (Charles Dharapak/AP)

In delivering his blunt assessment of the NATO alliance on Friday, Defense Secretary Robert M. Gates showed that he is comfortable playing bad cop on the world stage so that President Obama can play the good one.

Gates said NATO has become what he has long feared — an alliance divided between those who fund and fight the wars of today, and those who enjoy the benefits of the security they provide.

“This is no longer a hypothetical worry,” Gates told a think-tank audience in Brussels, as he concluded an 11-day valedictory tour of Europe before his scheduled end-of-the-month retirement.

“We are there today,” he continued starkly. “And it is unacceptable.”

The characteristically blunt message — honesty, he said, that is sometimes necessary between friends — contrasts sharply with the unvarnished celebration of the transatlantic alliance that Obama delivered last month on his own European tour.

The four-nation visit allowed Obama to remind European leaders, who have felt neglected by his administration’s focus on Asia, that they remain America’s most reliable allies.

Speaking on May 25 to a joint session of the British parliament in Westminster Hall, Obama called NATO “the most successful alliance in human history.”

He hailed it as a bulwark against terrorism and nuclear proliferation — and a defender of democracy and human rights around the world.

“Our action — our leadership — is essential to the cause of human dignity,” he told the audience gathered inside the nine-century-old Gothic hall. “And so we must act — and lead — with confidence in our ideals, and an abiding faith in the character of our people, who sent us all here today.”

Obama sounded none of the warnings that Gates did Friday in Brussels. White House officials said they were unsure whether Gates had run his remarks by the president before delivering them.

Where Obama praised NATO’s “new concept” to address 21st-century threats such as international terrorism, high-seas piracy and cyber-warfare, Gates criticized a lack of balance within the 62-year-old alliance that he said was imperiling its credibility.

Gates warned that declining European defense spending would prompt the U.S. Congress to wonder why America is shouldering an increasing share of global security costs at a time of severe fiscal stress at home.

And he said Europe’s sub-par war capabilities — from intelligence gathering to battlefield clout — would have to be improved “to avoid the very real possibility of collective military irrelevance.”

Gates didn’t single out which European nations he believes are falling most short of fulfilling their obligations. But he used the NATO-led mission in Libya, now in its third month, to highlight what he views as a wide-scale failing on the part of some nations.

He noted that “while every alliance member voted for the Libya mission, less than half have participated at all, and fewer than a third have been willing to participate in the strike mission.”

Among those nations is Germany, whose leader, Chancellor Angela Merkel, just concluded an official visit to Washington that included a festive State Dinner.

In private, Obama and Merkel spoke about the Libya mission during their meetings this week.

But the president had only kind words for the chancellor in their public appearance before the media, thanking her for deploying German surveillance aircraft to Afghanistan in order to free up international resources there for the Libya fight.

Obama said he expected Germany to play a “robust” role in helping Libya recover and build after Moammar Gaddafi is removed from power, something he and Merkel said was inevitable.

“Each country that is part of this coalition is playing a different role,” Obama said standing next to the chancellor in the East Room.

The difference in message from Obama and Gates is, in large part, a reflection of their different portfolios.

During his five-year tenure that has spanned two very different presidents, Gates has proved to be a fierce advocate for his commanders and protector of his troops — and his harsh message to NATO can be understood as a demand that his men and women get more help.

Obama and his project of promoting diplomatic engagement after the go-it-alone ways of his predecessor may require a softer approach on topics as politically charged as the Libyan operation, especially when he is standing next to a German leader whose help he needs not only in Afghanistan, but also to revive a world economy whose health is essential to his own political future.

But, as Gates leaves in a few weeks, who becomes the tough-love messenger abroad? It may fall to Leon Panetta, who as CIA director for the past two years, has often delivered his advice in private.