Doug Mills/The New York Times

The mission of President Obama’s 28-minute address to the nation was, first and foremost, a narrow one: to explain — and defend — his decision to engage in military action in Libya.

But in his speech, Mr. Obama also made a philosophical case for military intervention by the United States in support of democratic movements in the Middle East, North Africa and elsewhere around the world.

Ozier Muhammad/The New York Times

In doing so, the Democratic president echoed the language of his Republican predecessor while offering a more constrained view of America’s role in helping to sweep away the world’s dictators.

Like former President George W. Bush, Mr. Obama said it could be in the interests of the United States to exercise the military power that it alone possesses in the advancement of freedom. But far more than Mr. Bush, Mr. Obama stressed the need to use that power in the context of multilateralism and cooperation.

To those who would — and have — directly compared his intervention in Libya to Mr. Bush’s invasion of Iraq, Mr. Obama rejected the similarities and made clear that he had no interest in another protracted war.

“We are hopeful about Iraq’s future,” Mr. Obama said. “But regime change there took eight years, thousands of American and Iraqi lives, and nearly a trillion dollars. That is not something we can afford to repeat in Libya.”

He also framed his rationale for using American military might on a pragmatic, case-by-case basis in which the United States must weigh the moral imperatives of using force in a given country against the practical realities of the military situation on the ground.

“Given the costs and risks of intervention,” Mr. Obama said, “we must always measure our interests against the need for action.”

By contrast, Mr. Bush offered a more black-and-white argument in favor of intervention, saying the use of American power to end tyranny was a vital way to confront the forces of terrorism that threatened the United States after the Sept. 11, 2001, attacks.

And yet, a quick, side-by-side comparison of Mr. Obama’s speech with Mr. Bush’s second inaugural address suggests that both presidents found strikingly similar reasons to believe in the rightness of using American power on behalf of emerging democracies around the globe.

***

BUSH: “Our country has accepted obligations that are difficult to fulfill, and would be dishonorable to abandon. Yet because we have acted in the great liberating tradition of this nation, tens of millions have achieved their freedom. And as hope kindles hope, millions more will find it.”

OBAMA: “For generations, the United States of America has played a unique role as an anchor of global security and as an advocate for human freedom. Mindful of the risks and costs of military action, we are naturally reluctant to use force to solve the world’s many challenges. But when our interests and values are at stake, we have a responsibility to act.”

***

BUSH: “America will not impose our own style of government on the unwilling. Our goal instead is to help others find their own voice, attain their own freedom, and make their own way.”

OBAMA: “The United States will not be able to dictate the pace and scope of this change. Only the people of the region can do that. But we can make a difference.”

***

BUSH: “We will persistently clarify the choice before every ruler and every nation: The moral choice between oppression, which is always wrong, and freedom, which is eternally right. America will not pretend that jailed dissidents prefer their chains, or that women welcome humiliation and servitude, or that any human being aspires to live at the mercy of bullies.”

OBAMA: “We must stand alongside those who believe in the same core principles that have guided us through many storms: our opposition to violence directed at one’s own people; our support for a set of universal rights, including the freedom for people to express themselves and choose their leaders; our support for governments that are ultimately responsive to the aspirations of the people.

***

BUSH: “All who live in tyranny and hopelessness can know: the United States will not ignore your oppression, or excuse your oppressors. When you stand for your liberty, we will stand with you.”

OBAMA: “Born, as we are, out of a revolution by those who longed to be free, we welcome the fact that history is on the move in the Middle East and North Africa, and that young people are leading the way. Because wherever people long to be free, they will find a friend in the United States.”

***

BUSH: “America has need of idealism and courage, because we have essential work at home – the unfinished work of American freedom. In a world moving toward liberty, we are determined to show the meaning and promise of liberty.”

OBAMA: “Our strength abroad is anchored in our strength here at home. That must always be our North Star — the ability of our people to reach their potential, to make wise choices with our resources, to enlarge the prosperity that serves as a wellspring for our power, and to live the values that we hold so dear.”

***

BUSH: “We are led, by events and common sense, to one conclusion: The survival of liberty in our land increasingly depends on the success of liberty in other lands. The best hope for peace in our world is the expansion of freedom in all the world.”

OBAMA: “For generations, we have done the hard work of protecting our own people, as well as millions around the globe. We have done so because we know that our own future is safer, our own future is brighter, if more of mankind can live with the bright light of freedom and dignity.”