By Benjamin Pimentel, MarketWatch

Technology stocks were mostly higher Friday, propelled by gains in shares of Red Hat Inc., which rose sharply a day after the company posted upbeat results.

Red Hat (RHT) rallied 14.5% to close at $56.10, one of the top gainers on the S&P 500(SPX), which was up 0.5%.

Late Thursday, the open-source software maker reported better-than-expected profit and revenue. Raymond James analyst Michael Turits upgraded the stock to outperform from market perform, citing an "extremely strong fiscal third quarter."

After a volatile start, BlackBerry (RIMM) shares were up 15.5% to close at $7.22 after the handset-maker reported a third-quarter loss, but also announced that a five-year contract with manufacturer Foxconn. It was the stock's best day since April 2009.

Shares of Twitter (TWTR) were also up 4.4% to close at $60.01. Apple Inc.(AAPL) gained 1% to close at $549.02, giving the Nasdaq Composite Index (RIXF) a lift. The benchmark rose 1.2% to close at 4,105 on Friday, and ended the week with a 2.6% gain. Apple also posted its first stock gain in four days.

Oracle (ORCL) was off 0.6% to close at $36.37. The Redwood City, Calif.-based software giant announced Friday that it was buying marketing software company Responsys for $1.5 billion.

Gains also came from Google Inc.(GOOG) and Facebook Inc. (FB) . On the other hand, shares of Hewlett-Packard (HPQ) shed 1% to close at $27.79.

Shares of Amazon.com (AMZN) topped $400 for the first time ever. The stock traded up 1.8% to close at $402.20.

More news from MarketWatch:

New tweak to Obamacare not welcomed by insurers, investors

Judge tells lawyers who sued Citigroup: No, you can't pay yourself that much

Subscribe to WSJ: http://online.wsj.com?mod=djnwires

Red Hat (NYSE:RHT)
Historical Stock Chart
From Feb 2024 to Mar 2024 Click Here for more Red Hat Charts.
Red Hat (NYSE:RHT)
Historical Stock Chart
From Mar 2023 to Mar 2024 Click Here for more Red Hat Charts.