Updated

Investors brushed aside more grim Spanish financial news and lower-than-anticipated U.S. economic growth figures, helping stocks to rally at the end of what has turned out to be a solid week for markets.

Over the past couple of weeks, investors have grown increasingly jittery over Europe's debt crisis as well as the state of the economic recovery in the U.S. Though those concerns remain, stocks have generally advanced this week on the back of a largely positive round of U.S. corporate news, notably from Apple Inc., the world's most valuable company by market value.

"U.S. earnings have certainly offset any negative effects of bleak economic data," said Jordan Lambert, a trader at Spreadex.

That positive sheen helped markets deal with the news that Spain's debt was downgraded by Standard & Poor's and a further increase in the country's unemployment rate to 24.4 percent in the first quarter of 2012 from 22.9 percent in the previous three-month period.

Spain's economic problems have become the epicenter of Europe's debt crisis in recent weeks as investors worry over the country's ability to push through austerity and reforms at a time of recession and mass unemployment.

The increase in the unemployment rate came just hours after Standard & Poor's became the first of the three leading credit rating agencies to strip Spain of an A rating. It cited a worsening budget deficit, worries over the banking system and poor economic prospects for its decision to reduce the rating by two notches from A to BBB+. It even warned that a further downgrade is possible as it left its outlook assessment on Spain at "negative."

Investors have grown concerned that as Spain's economy shrinks and unemployment rises, the government will not meet its deficit targets and will be forced into seeking a financial rescue as Greece, Ireland and Portugal have done before.

Stock indexes across Europe initially reacted negatively to the news, but soon recovered their poise as the downgrade was largely viewed as a belated acknowledgment of the market realities.

"As so often with downgrades, this is no more than a restatement of what we already expect, so the actual impact has been fairly muted," said David Jones, chief market strategist at IG Index. "

In Europe, the FTSE 100 index of leading British shares was up 0.5 percent at 5,777 while Germany's DAX rose almost 1 percent to 6,801. The CAC-40 in France was 1.4 percent higher at 3,266. Spain's IBEX index outperformed its peers, trading 1.8 percent higher despite the twin bits of bad news.

The euro also eked out a 0.5 percent rise to $1.3251, having initially fallen on the bad Spanish news.

Wall Street opened strongly despite figures showing that the U.S. economy only grew by an annualized rate of 2.2 percent in the first three months of the year. That was below the previous quarter's 3 percent rate and short of expectations for a 2.5 percent rise.

The Dow Jones industrial average was up 0.3 percent at 13,241, while the broader S&P 500 index rose 0.2 percent to 1,403.

"The U.S. economic expansion continues at a modest to moderate rate, with little momentum, but should pick up somewhat later this year as business investment gets back on track," said Sal Guatieri, senior economist at BMO Capital Markets.

Earlier in Asia, key benchmarks gave up early gains to close lower. Japan's Nikkei 225 index fell 0.4 percent to close at 9,520.89 after briefly jumping 1 percent after the Bank of Japan said it will expand its asset-buying program to help support the economy.

Hong Kong's Hang Seng fell 0.3 percent to 20,741.45 while in mainland China, the benchmark Shanghai Composite Index slipped 0.4 percent to 2,396.32 and the Shenzhen Composite Index lost 0.3 percent to 940.35.

____

Pamela Sampson in Bangkok contributed to this report.