BJ's Wholesale Club reported a higher-than-expected quarterly profit on Wednesday on improved margins, and the warehouse club operator raised its profit outlook for the year.

BJ's profit for the second quarter that ended August 1, was $35.1 million, or 64 cents per share, compared with $36.5 million, or 61 cents per share, a year earlier.

Analysts, on average, had been expecting earnings of 62 cents per share, according to Reuters Estimates.

BJ's previously announced its second-quarter sales fell 5.2 percent to $2.5 billion, while sales at its clubs open at least a year, or same-store sales, dropped 7.7 percent.

As the recession pressures household budgets, warehouse clubs such as Costco Wholesale Corp , Wal-Mart Stores Inc's Sam's Club and BJ's Wholesale are attracting shoppers seeking low prices on staple items, like bread and paper towels.

People pay an annual fee to shop in the clubs and get discounts on everything from cartons of fresh fruit to flat panel TVs and gasoline for their cars.

But the clubs are facing greater challenges compared with a year ago when high gas prices and food inflation spurred their sales.

For the full year, the company expects earnings of $2.46 to $2.56 a share, up from its prior outlook of about $2.44 to $2.54 a share.

BJ's shares were up $1.23 at $32.55 in trading before the opening bell.

(Reporting by Dhanya Skariachan in Bangalore; Editing by Maureen Bavdek)