America is not fated to lose its leadership position in the world. But President Obama and his Republican opposition, in different ways, are making that outcome more likely.

In the decades after World War II, as Japan, Germany, France and Britain recovered and America’s share of the global economy declined, we could have accepted the inevitability of a multipolar world.

Instead, the United States drew the reemerging powers into alliances that spread the burden of leadership, magnified U.S. influence and promoted freedom and free trade.

Now a new generation is debuting — South Korea, China, India, Brazil and more. This is a good thing. As those countries prosper, hundreds of millions of people move from misery into decent lives.

And as they do, the U.S. share of the global economy will decline further. But that no more guarantees the decline of U.S. influence than did the recovery of our foes and allies a half-century ago. The United States retains great advantages, not least that other nations see the benefit of rules we help enforce, like open and safe sea lanes, and the moral authority of enforcing those rules without seizing the benefits of empire.

But if Republican leaders make America less hospitable to immigrants, they will negate one huge advantage over countries such as Japan, Italy and even China, whose populations are aging and who do not benefit from the vigor of enterprising new arrivals.

More fundamentally, the doctrinaire Republican insistence on ever-shrinking government would sap the country’s ability to invest in the research, education, infrastructure and military strength that a great power needs. Rep. Eric Cantor’s our-way-or-the-highway abandonment of budget talks last week does more than set a bad example for leaders from Egypt to Iraq to Thailand, who we hope will learn that democracy requires give-and-take. If government is restricted to a smaller share of the economy than at any time in the past half-century, it will hasten American decline.

Obama, for his part, has spoken eloquently about U.S. leadership. “Whatever mistakes we have made, the plain fact is this: The United States of America has helped underwrite global security for more than six decades with the blood of our citizens and the strength of our arms,” he said as he accepted the Nobel Peace Prize in 2009. “We have borne this burden not because we seek to impose our will. We have done so out of enlightened self-interest — because we seek a better future for our children and grandchildren, and we believe that their lives will be better if others’ children and grandchildren can live in freedom and prosperity.”

He also has spoken eloquently about the need to enlist allies, which becomes only more important as new powers emerge.

Yet in Libya he has undermined NATO by refusing to let U.S. forces play a full part, putting caveats on U.S. involvement comparable to those set by our allies — to great U.S. irritation — in Afghanistan. Far from strengthening the historic alliance, this turns it into a collection of shifting coalitions of the willing.

At home he pocketed $400 billion in budget cuts offered by Defense Secretary Robert Gates and then demanded $400 billion more over 10 years. Those cuts may be achievable without harming U.S. leadership, but Obama doesn’t know that to be true. By setting the fiscal target, and having the Pentagon adjust strategy accordingly, he sends a message that deficit reduction matters most.

It’s that same lack of conditionality that undermines his latest Afghanistan policy. Obama has said it is a strategic imperative to fight the Taliban to a standstill and train an Afghan army that can keep the nation at peace. But then how can it make sense to set a withdrawal schedule irrespective of whether those goals are achieved? The message, again, is that domestic considerations take precedence over global responsibilities.

In fact, Obama embraced retreat as policy in his address last week: “America, it is time to focus on nation-building here at home.”

That’s an understandable line for the campaign trail. Americans naturally listen sympathetically to the argument that we should take care of our own, especially in hard economic times. The cases for keeping the Strait of Malacca open to international navigation, treating AIDS sufferers in Rwanda or resisting abandoning Afghanistan 20 years after we last made that mistake — those take more explaining.

It takes spine, too, to persuade Congress to pay the cost of what Obama formerly understood as the “enlightened self-interest” of global leadership. Whether the United States continues to help keep the peace will depend less on India or Brazil’s emergence than on whether it can find leaders, as it always has before, with the conviction to make the case.