Better-than-expected retail sales in March were unable to sustain an early rally on Wall Street as stocks struggled to come off their worst two-week period in more than four months, with a march higher in Spanish bond yields continuing to undermine confidence.

The Nasdaq fell sharply, weighed down by a near 3-percent drop in Apple Inc . A fall in sales at Mattel Inc and a decline in Google Inc shares ahead of a high stakes legal battle with Oracle Corp also hurt the Nasdaq.

Spanish 10-year government bond yields broke through the 6-percent mark on Monday for the first time since the beginning of December. Spain has acknowledged that it has probably tipped into its second recession since 2009.

Europe is back. All this talk about Spain is unsettling for the market, said Frank Lesh, a futures analyst and broker at FuturePath Trading LLC in Chicago.

Stocks initially bounced sharply at the open after retail sales rose more than expected in March, indicating economic growth in the first quarter did not soften as much as many had feared.

Gains for International Business Machines Corp and Caterpillar Inc helped shield the Dow, as the high-priced stocks provided an outsized boost for the price-weighted index. IBM gained 0.6 percent to $203.97, and Caterpillar rose 1.3 percent to $107.26.

The Dow Jones industrial average <.DJI> was up 68.46 points, or 0.53 percent, at 12,918.05. The Standard & Poor's 500 Index <.SPX> was up 0.56 points, or 0.04 percent, at 1,370.82. The Nasdaq Composite Index <.IXIC> was down 15.73 points, or 0.52 percent, at 2,995.60.

Before Monday's open the S&P 500 index had dropped 2.7 percent over the prior two weeks, its worst two-week slide since November, on increasing concerns about the euro-zone debt crisis and weaker-than-expected economic data.

Citigroup Inc advanced 2.5 percent to $34.21 after posting a first-quarter profit that topped Wall Street expectations. The KBW Bank index climbed 0.6 percent.

The economic picture was not entirely upbeat as the New York Federal Reserve said the pace of manufacturing growth in New York state slowed sharply in April to its lowest level in five months.

Earnings season will pick up steam this week, with 86 S&P 500 companies scheduled to report results. According to Thomson Reuters data through Monday, of the 34 S&P 500 companies to have reported earnings so far, 76 percent have reported earnings above analyst expectations.

Mattel's quarterly profit fell short of analysts' expectations as price increases hurt sales of its iconic Barbie dolls and Hot Wheels cars, sending the world's largest toy company's shares down 7.5 percent to $31.56.

Baxter International Inc dipped 6 percent to $54.54 and Halozyme Therapeutics Inc plunged 27 percent to $8.23 after the companies said health regulators requested more data to complete their review of HyQ Biologics.

Jury selection began on Monday in a high-stakes dispute over smartphone technology between Oracle and Google, kicking off a trial in which chief executives of both companies are expected to take the stand. Oracle added 0.1 percent to $28.46 and Google slipped 2.5 percent to $608.87.

(Editing by Padraic Cassidy)