Yahoo Inc said it would cut 5 percent of its global workforce and reported quarterly results that showed progress toward controlling costs, sending shares higher in an after-hours relief rally.

The Internet company said economic conditions remained challenging, as revenue on Yahoo Websites from both display ads and search ads fell during the first quarter.

But the decline in revenue was offset by better cost controls, as new Chief Executive Carol Bartz seeks to revive Yahoo's fortunes.

People were really looking at the profit structure of the business and for things not to be falling apart, said Kaufman Brothers analyst Jason Avilio.

Yahoo said last October it would cut about one-tenth of its workforce, or about 1,600 jobs. The company finished 2008 with roughly 13,600 employees and said it would take severance charges from the new round of layoffs during the second quarter.

The company also announced in an internal memo to employees on Tuesday that it planned to implement a mandatory shutdown of operations during the holiday week of December 25, 2009 through January 1, 2010.

Yahoo said its operating cash flow, excluding certain items, was $409 million in the first quarter, at the high end of the $365 million to $415 million range it forecast in January.

Yahoo shares were up 54 cents at $14.92 in after-hours trading on Tuesday. The company's stock is up roughly 9 percent from its Monday close of $13.66.

Yahoo's financial report comes as speculation has mounted that the firm has restarted discussions with software giant Microsoft Corp about an Internet search partnership, following last year's failed merger negotiations.

Bartz, who replaced Yahoo co-founder Jerry Yang in the top job in January, declined to comment on anything related to Microsoft during the conference call on Tuesday.

But she reiterated her belief that search is a very valuable part of Yahoo's business.

I'm well-versed enough in the search business at Yahoo to say it's absolutely critical to Yahoo, Bartz said in response to a question regarding whether she is now familiar enough with the business to respond to an offer for search.

AIM TO KEEP COSTS IN LINE

In the first full quarter under Bartz's leadership, Yahoo generated revenue of $1.58 billion, down 13 percent from the year-ago period.

Excluding traffic acquisition costs (TAC), Yahoo's revenue was $1.16 billion, compared with the average analyst expectation of $1.2 billion, according to Reuters Estimates.

The Sunnyvale, California-based company reported a net profit in the first quarter of $118 million, or 8 cents a share -- down from $537 million, or 37 cents a share, a year earlier. Wall Street analysts, on average, had forecast earnings at 8 cents a share, according to Reuters Estimates.

While revenues were a bit light, Jefferies & Co. analyst Youssef Squali said in an e-mail that Yahoo's overall results, particularly on the bottom line, were not bad given the environment.

Yahoo said that revenue from display ads on its owned and operated Websites slid 13 percent year-over-year in the first quarter, with revenue from automotive advertisers down substantially and spending by retail advertisers softened compared to the year ago period.

Revenue from search-based ads on Yahoo sites were down 3 percent. And Yahoo said that advertisers were spending less money to bid for the individual keywords that their ads appear alongside, echoing a theme present in results last week from Google Inc, the No.1 U.S. Internet search company.

Yahoo, like Google, stressed the importance of keeping costs in line amid the difficult economy.

The new round of job cuts come about two months after Bartz announced a reorganization of Yahoo's internal management structure.

The layoffs, said Bartz, are a natural outgrowth of the reorganization, which will allow Yahoo to streamline its operations and eliminate duplication of efforts.

The Internet company said it would also continue to implement unspecified non-headcount cost reductions, so it can increase its ability to make strategic investments and target hiring in its core operations

It's crucial that management adjusts the cost structure to the new growth (or lack thereof) realities; so margin protection is paramount to Yahoo right now, said Jefferies analyst Squali. We think there is potential outperformance on margins.

Chief Financial Officer Blake Jorgensen told Reuters there were still very dark clouds on the horizon for the economy.

I'll try to resist calling the bottom in any way, he said in a telephone interview.

Yahoo projected that sales in the current quarter would range between $1.425 billion and $1.625 billion.

(Reporting by Alexei Oreskovic and Anupreeta Das; Writing by Tiffany Wu; Editing by Gary Hill, Andre Grenon and Bernard Orr)