Stocks managed to hold on to their gains Friday as investors bought into the battered technology sector and IBM (IBM) rebounded after regulators closed a probe into possible accounting improprieties. But unrelenting violence in the Middle East and next week's flood of earnings reports kept the mood cautious.

The blue-chip Dow Jones Industrial Average gained 14.74 points, or 0.14 percent, to 10,190.82. The Dow's 0.8 percent drop for the week made it the fourth consecutive losing week for the blue-chip average, a skid unseen since last September.

The tech-packed Nasdaq Composite Index rose 30.95 points, or 1.79 percent, to 1,756.19, while the broad Standard & Poor's 500 Index climbed 7.32 points, or 0.66 percent, to 1,111.01.

The S&P 500 logged its fourth successive weekly decline, a drop unseen since the benchmark gauge tumbled eight weeks in a row over a period ended late March 2001. The Nasdaq notched its fifth straight losing week, dropping 0.8 percent -- a downward trend that last occurred just over 12 months ago.

"It's just a bounceback," Michael Vogelzang, president of Boston Advisors, Inc, said of Friday's gains. "It's been a brutal couple of weeks."

IBM rose $1.30 to $85.60 -- off its high of the day of $87.50, but offering support to the Dow. It rebounded after helping spark a sell-off a day ago on fears of accounting problems at the world's No. 1 computer maker. Investors, edgy after the collapse of energy trader Enron Corp., breathed a sigh of relief when the Securities and Exchange Commission said after Thursday's close it opened and shut a preliminary inquiry into the Dow member.

One bright spot was JetBlue Airways Corp. (JBLU), which surged 67 percent, or $18, to $45 in its first day of trade on Nasdaq. The company raised $158.4 million in an initial public offering, the issue price topping expectations as the airline's growing profits and low costs attracted strong demand.

The S&P airlines index jumped 4.93 percent, and the S&P transport index climbed 3.39 percent as investors hoped lower energy prices would help the bottom line in those sectors.

"The market has been so beat down on the negativity, and I think a little bit of positive news goes a long way right now," said Bill Yancey, manager of equity trading department at SWS Securities, adding: "There is still a lot of caution in the market."

Tensions are high ahead of a busy week for earnings reports and against the backdrop of bloodshed in the Middle East. Questions about the speed of the U.S. economic recovery were also on investors' minds. Economic reports on Friday showed consumers kept spending in March, but only at a modest pace, and consumer sentiment dipped in early April, in part due to the Middle East violence.

Oil stocks dragged on the market as they followed oil prices lower. Oil prices, which have rallied in past weeks on the intensifying Middle East conflict, fell after Venezuelan President Hugo Chavez agreed to resign under pressure from the military. The move is expected to end a strike at the nation's state oil company that cut exports this week.

ExxonMobil Corp. (XOM), the world's largest publicly traded oil company, lost $1.10 to $41.30, while the American Stock Exchange's oil index slumped 2.88 percent.

General Electric Co. (GE), the world's most valuable company by stock market capitalization, fell 20 cents to $33.55 and was the most active share traded on the Big Board. GE slumped 9 percent on Thursday after posting a rare drop in quarterly net income after charges for accounting changes. Its revenues were also weaker than many analysts had hoped.

But telecommunications firms rose, recovering from a severe beating in recent days on worries the sector will continue to be plagued by the soft economy, price wars and weak demand.

Wireless phone service provider Sprint PCS Group (FON) jumped 73 cents, or 8 percent, to $9.96. The Amex North American telecommunications index rose 2.5 percent.

Banking stocks also rose after getting hit on Thursday as Merrill Lynch & Co. Inc. (MER) came under fire in the New York state attorney general's probe of the state of Wall Street research. Merrill fell 1 cent to $46.89, but banks like J.P. Morgan Chase (JPM), up 82 cents at $34.28, rebounded.

Merck & Co. Inc. (MRK) rose $1.85, or more than 3 percent, to $54, supporting the Dow. The drug giant said U.S. regulators approved use of its hot-selling drug Vioxx for rheumatoid arthritis, and approved new language on its label that may damp concerns about heart attack risks.

Mercury Interactive Corp. (MERQ) jumped $7.26, or 25 percent, to $36.70. It beat Wall Street expectations even though net profits fell from a year ago, and stood by its original 2002 forecast -- one of only a few software makers to do so.

Wall Street got more data on Friday which showed the U.S. economy is rebounding, the U.S. Producer Price Index for March, which reflects prices at the wholesale level, rose 1.0 percent. Excluding volatile food and energy prices, the core PPI gained just 0.1 percent for March. Retail sales rose 0.2 percent overall in March and consumer sentiment, in the University of Michigan survey, fell to 94.4 in April from 95.7 in March.

For Monday's trading session, resistance -- the point where sellers are likely to emerge -- is at 10,300 for the Dow, 1,782 for the Nasdaq and 1,120 for the S&P, according to research firm Schaeffersresearch.com.

Support -- where buyers are expected to swoop in -- is at 10,000 for the Dow, 1,725 for the Nasdaq and 1,100 for the S&P. The levels are key elements of technical analysis, which studies prices, volume and charts.

Advancing issues led decliners 2 to 1 on the New York Stock Exchange. Volume came to 1.25 billion shares, compared with 1.51 billion at the same point Thursday.

The Russell 2000 index rose 11.73 to 515.46.

Overseas, Japan's Nikkei stock average lost 1.7 percent. In Europe, Germany's DAX index climbed 0.5 percent, Britain's FT-SE 100 rose 0.5 percent, and France's CAC-40 advanced 0.6 percent.

Reuters and the Associated Press contributed to this report.