By SUDEEP REDDY

WASHINGTON—Spain's agreement to recapitalize its troubled banks marked a critical step to calm global financial fears, but another giant threat still looms: Greece's elections on Sunday. Both events could prove more influential than anything President Barack Obama can do at home in determining whether the U.S. economy perks up ahead of the fall elections.
If Greece stays in the euro zone and the European debt crisis abates, the U.S. economy could conceivably stabilize enough in the coming months to allow Mr. Obama to sustain his argument that the U.S. economy is slowly improving.
If Greece exits, risking a breakup of the currency union, then the applause for the Spanish bailout could quickly give way to widespread fears about another global crisis—just as he is heading into the final stretch of the election.
Mr. Obama himself underscored that reality with his unusual appearance in the White House press briefing room Friday. In remarks clearly designed to influence euro-zone officials ahead of their weekend talks, he devoted much of his attention to Europe's troubles. He spoke at length about what the Continent needed to do—including injecting capital into Spanish banks—even before he chastised Congress for blocking his domestic policy proposals.
Spain's decision Saturday to accept as much as €100 billion ($125 billion) from Europe to bail out its banks represented another mixed success in the Obama administration's two-year campaign for bolder European action to quell the Continent's debt crisis.
With Spain, the U.S. had pressed behind the scenes in recent months for euro-zone rescue money to be injected directly into Spanish banks, instead of going through a loan to the government as now planned. That goal was pushed publicly by the International Monetary Fund and many nations in Europe—apart from the most powerful, Germany—to avoid adding to Madrid's already bloated government debt load and risking even higher Spanish borrowing costs in the coming months.
U.S. officials ramped up private pressure over the past two weeks, dispatching a top Treasury official to Europe and arranging numerous calls between Mr. Obama and his European counterparts. They stressed the urgent need for Spain to accept help and announce a large program early—instead of allowing the threat to fester and become even more expensive while waiting for detailed bank evaluations. That guidance springs from the U.S.'s playbook in its 2008-09 bank-rescue program, in which the government sought to restore market confidence with quick bank capital injections.
The ultimate European moves Saturday won praise from the administration. "These are important for the health of Spain's economy and as concrete steps on the path to financial union, which is vital to the resilience of the euro area," Treasury Secretary Tim Geithner said in a statement after Spain announced its agreement.
Still, this push, like prior efforts, demonstrated the limits of U.S. engagement during a crisis in which it doesn't have a central role, doesn't have much leverage and is relegated to nudging and prodding from the sidelines.
Over the past two years, U.S. officials pushed their European counterparts hard to build a financial firewall large enough to ward off market threats. The European rescue fund is now sizable—about €700 billion—but not as much as the U.S. and IMF had urged, a problem that could be disastrous if Greece exits the euro zone. Other U.S. guidance, such as advice on European bank stress tests, also wasn't implemented as delivered, resulting in stress tests that failed to convince markets the banks were strong enough to withstand greater financial turmoil.
Yet Mr. Obama has continued to bet that the voice of the world's largest economy carries weight overseas and that U.S. views remain respected, even if diminished somewhat by domestic political brawls over the U.S. budget and debt ceiling.
He will have another opportunity to test that power in a week, when he travels to Mexico for the Group of 20 summit of the world's largest advanced and developing economies. The gathering will start starting one day after Greece's elections, as Greek lawmakers are either forming a new government to stay in the currency union or setting in motion steps that could lead to the country's withdrawal.
Mr. Obama on Friday made his most direct appeal yet to Greece, saying its people "need to recognize that their hardships will likely be worse if they choose to exit from the euro zone."