NEW YORK — As world leaders searched for a way out of Europe’s mounting debt crisis, U.S. investors moved to the sidelines.

The major market indexes closed modestly higher, after wavering between slight gains and losses throughout the morning. Trading volume was light and the stock moves were small. In Europe, markets were mixed.

The Dow Jones industrial average rose 26.49 points, or 0.2 percent, to 12,127.95. It traded within a range of 75 points, one of the narrowest of the year.

Timothy McCandless, senior stock analyst at Bel Air Investment Advisors in Los Angeles, described Tuesday’s market as stuck in purgatory: The economy is not strong enough to represent a healthy recovery, but not weak enough for the Federal Reserve to do more to help.

“It’s wrestling with those two sides,” McCandless said. “We’re right in between.”

Finance ministers and central bank presidents from the world’s seven wealthiest nations held an emergency conference call to discuss how Europe can heal its weakest countries without alienating the stronger ones that have to foot the bill. Leaders are worried that Spain and Cyprus, which are scrambling for money to prop up their troubled banks, will soon need to be bailed out by their richer counterparts.

“As we saw in Lehman Brothers, when fear hits the banking system, it shuts down,” said Jim Millstein, CEO of the advisory firm Millstein & Co. and a former Treasury official who oversaw the agency’s investments in AIG and other troubled financial institutions.

The call didn’t yield any concrete solutions for Europe, at least not publicly. Several investors who were unsure of what to do Tuesday said they expect more clarity – and perhaps more drama – later this month, after Greece holds elections June 17 and world leaders from the nations known as the Group of 20 meet for the two days afterward.

Spain isn’t part of the Group of Seven, the countries that held the conference call, but the U.S. and Germany are. As the G-7 leaders met, Spain’s prime minister issued a plea for Europe “to support those that are in difficulty.” Just beforehand, Spain’s finance minister said the country was in danger of not being able to borrow money on the open market.

The yield on Spain’s 10-year bonds crept down to 6.31 percent, but that is still dangerously high. Other countries including Greece and Portugal were forced to seek bailouts once their borrowing costs hit 7 percent.

Patrick O’Keefe, director of economic research at the accounting and consulting firm J.H. Cohn, was surprised that markets didn’t react more forcibly to Spain’s warning flags.

“A couple of years ago, a statement like that by any sovereign would have roiled the market,” O’Keefe said. He guesses that the market, used to bad news by now, has already priced in European calamity.

“We were saying, ‘We’re on the brink’ in 2008,” O’Keefe said. “We’re not all that far from the brink now.”