SAN FRANCISCO - Clothing retailer Gap Inc. boosted its first-quarter profit 40 percent despite a persistent sales slump that seems likely to deepen this summer as consumers scrimp on fashion to help offset rising gasoline and food bills.

The merchant, based in San Francisco, said yesterday that it earned $249 million, or 34 cents a share, during the three months ended May 3. That compared with net income of $178 million, or 22 cents a share, a year earlier.

Revenue for the period fell 5 percent to $3.38 billion.

The earnings beat the average estimate of 30 cents a share among analysts polled by Thomson Financial. The revenue missed analysts' target of $3.42 billion.

"We are pleased with our first-quarter performance in what undoubtedly was one of the most difficult retailing environments in recent memory," Gap chairman Glenn Murphy said in a conference call with analysts.

Gap shares gained 22 cents to finish yesterday's regular session at $18.29, then added an additional 46 cents in after-hours trading.

But in a telling sign of Gap's misery, sales at stores open for at least a year dropped 11 percent - the company's worst erosion yet during a downturn that has lasted nearly four years.

Gap's same-store sales have now declined in 15 consecutive quarters, by far the retailer's worst stretch of trouble since cofounders Donald and Doris Fisher opened the first store in 1969.

Since then, Gap has become a shopping center anchor with 3,177 stores worldwide. Besides the Gap, the company also owns the Old Navy and Banana Republic chains. Murphy indicated that the company planned to end the year with 3,000 stores as management weeded out its biggest trouble spots.

Except for a brief upturn in 2003, Gap has struggled through most of this decade to design clothes that inspire shopping sprees. To clear the store shelves, Gap frequently had to offer steep discounts that crimped its profits.

Since hiring Murphy as its chief executive officer last July, Gap has been able to avoid dramatic markdowns by more effectively managing its clothing inventory. The more disciplined approach - combined with lower advertising expenses, layoffs, and other cost cutting - has helped increase Gap's profits for four consecutive quarters.

But the company's fashion tastes still are not inspiring consumers to open their wallets - a challenge that has become more daunting as more households cut corners to keep gasoline in the tank and food in the cupboard.

"We see no signs of improvement in the psyche of the American consumer," Murphy said.

Gap still says it believes it will be able to deliver the full-year earnings of $1.20 to $1.27 a share that it projected in February.

The financial pressures facing consumers have helped spur more sales at bargain-peddling merchants such as Costco Wholesale Corp. and Wal-Mart Stores Inc., but Gap's discount brand - Old Navy - is not enjoying similar success. Old Navy's same-store sales plunged 18 percent in the first quarter.

Murphy said Old Navy would try to rebound by trying to cater to budget-conscious women looking for clothing for themselves and their families.