February sales at Costco Wholesale Corp and BJ's Wholesale Club Inc surpassed Wall Street's expectations, as members drove in for deals on gasoline and stayed to do more of their shopping.

Costco, BJ's and Wal-Mart Stores Inc's Sam's Club see business at their pumps perk up when gasoline prices rise, as they have been doing amid political unrest in the Middle East and Africa.

With the price of regular gasoline close to $4 a gallon in some parts of the country, retailers such as Costco are doing what they can to absorb higher commodity costs, a move that could pressure margins.

For now, the economy remains on solid footing despite the spike in gas prices, according to recent consumer confidence data.

BJ's has gas stations at 103 of its 190 or so locations and sales and memberships increase in tandem with the price per gallon.

We see each week and each day, actually, as gas prices rise, more and more traffic to the clubs, Chief Executive Laura Sen said during a conference call. We see this as one of our best marketing tools, especially in a rising price environment.

BJ's, which is considering selling the company, also reported a better-than-expected quarterly profit, while Costco's profit met Wall Street's expectations.

Wall Street Strategies analyst Brian Sozzi cut his rating on Costco to sell from hold and his price target to $65 from $75, in part because Costco's decision to hold off on raising prices for a bit could pressure its margins.

BJ's shares rose 0.5 percent to $48.57, while Costco's shares slipped 1.7 percent to $72.39.

Costco, the top warehouse club operator, said that lower-margin gasoline accounted for 8.5 percent of sales in the quarter, up from 7.2 percent a year earlier.

Costco's February sales at stores open at least a year rose 8 percent, while analysts were looking for a 7 percent increase, according to Thomson Reuters data.

Smaller competitor BJ's said its February same-store sales rose 5.5 percent. Analysts were expecting a 3.5 percent gain.

Costco's February same-store sales in the United States rose 6 percent including gas, or 4 percent excluding it. At BJ's, same-store sales rose 2.4 percent without gas.

Meanwhile, all eyes are on BJ's potential sale, which the company did not discuss on Wednesday.

The possible sale sort of overrides the fundamentals at least for the near term, said Walter Stackow, a senior research analyst at Manning & Napier, which has held BJ's shares for nearly three years.

Stackow expects a buyer would be a private equity firm or consortium, not a grocer or other strategic player.

HIGHER FEE AT BJ'S, COSTCO KEEPS FEES INTACT FOR NOW

Warehouse clubs sell everything from televisions to bulk packages of avocados, juice and diapers, in warehouse-style stores at which members pay an annual fee to shop.

BJ's raised its annual membership fee $5 to $50 in January, matching Costco's lowest-price membership. Sam's Club's least expensive membership is $35 per year.

Costco, which last raised its fees in 2006, has not yet decided whether to increase them again, Chief Financial Officer Richard Galanti said during a conference call.

Costco earned $348 million, or 79 cents per share, in its fiscal second quarter that ended on February 13, up from $299 million, or 67 cents per share, a year earlier. The profit met analysts' expectations, according to Thomson Reuters I/B/E/S.

BJ's, which opened its doors in 1984, earned 95 cents per share in the fiscal fourth quarter that ended on January 29, up from 94 cents a year earlier, topping analysts' forecast of 92 cents.

BJ's forecast first-quarter earnings of 54 cents to 58 cents per share and fiscal-year earnings of $2.62 to $2.82 per share.

Costco said that it plans to open 15 or 16 new warehouses, including one relocation and one reopening, before its fiscal year ends on August 28. BJ's has plans to open six to eight clubs this year, including one relocation and four or five smaller clubs that are about 85,000 square feet.

Last week, Wal-Mart said fourth-quarter sales at Sam's Club rose 4.5 percent, or 2.7 percent excluding fuel. Sam's Club, the No. 2 warehouse behind Costco, expects same-store sales to rise 1 percent to 3 percent this quarter, excluding fuel.

(Additional reporting by Isheeta Sanghi in Bangalore; Editing by Dan Lalor, Maureen Bavdek, Dave Zimmerman)