NEW YORK — Another flare-up in Europe’s debt crisis knocked U.S. markets lower Friday. This time, it was more trouble at a major Spanish bank.

Stock indexes were waffling between small gains and losses until news broke in the afternoon that Bankia, a hobbled Spanish lender, asked that country’s government for $23.8 billion in support. Earlier in the day, Standard & Poor’s cut the bank’s credit rating to junk status because of deepening uncertainty over its restructuring plans.

The Dow Jones industrial average dropped as much as 108, then recovered slightly to end down 74.92 at 12,454.83. Concerns about Europe have sent the Dow on a steady slide this month, erasing most of its gains from the first quarter. It finished the week slightly higher, its first weekly gain for May.

The declines were broad. Eight of the 10 industry groups in the S&P 500 index fell. The only sectors that rose were utilities and telecommunications, which investors tend to buy when they’re skittish about the market. Trading volume was light ahead of the Memorial Day holiday.

Facebook, marking its one-week anniversary as a public company, fell 3.4 percent to $31.91.

In addition to the new worries about Spain, the head of Germany’s central bank, which has been skeptical of bailing out Greece and other weak European countries, reinforced the point when he said it was an “illusion” to think allowing euro zone countries to borrow money jointly would solve the crisis.

In other trading, the S&P 500 fell 2.86 to 1,317.82. The Nasdaq composite fell 1.85 to 2,837.53.

Greece’s June 17 elections are an overhang on the market. The results will determine if Greece agrees to the spending cuts that it must swallow if it wants to stay in the 17-country euro zone, or if it goes its own way.

The idea of cutting government spending is unpopular in a country which is in a fifth year of recession and residents have grown accustomed to public-sector largesse. But if Greece left the euro zone, it would have to revert to its own currency. That would be severely devalued, and the country’s standard of living would probably be crushed.

Greece makes up just 2 percent of the euro zone economy, but its fate would carry ripple effects to other, larger members. Unnerved traders could dump the bonds of other struggling European countries, such as Spain and Italy. Residents could start to pull money out of banks there, as has been happening in Greece.

The standoffs so far have almost always lasted until the 11th hour.

“Every time you think it’s going to fall off a cliff and end very badly, something happens,” said Beata Kirr, senior portfolio manager at Bernstein Global Wealth Management in Chicago.