Wal-Mart Stores Inc said same-store sales at U.S. discount stores turned positive in July as it sharpened its focus on low prices to try to end more than two years of quarterly sales declines.

Wal-Mart's comments and its quarterly results sent its shares higher on Tuesday as the world's largest retailer, with nearly 9,700 stores around the world, stressed its commitment to selling its products for less than its competitors do.

While Walmart U.S. same-store sales fell 0.9 percent in the quarter that ran from May through July, that measure rose in July and the company still expects it to rise on a quarterly basis this year, Walmart U.S. CEO Bill Simon said.

Shares of Wal-Mart, which posted better-than-expected increases in quarterly profit and sales, rose 3.4 percent as the forecast helped assuage the fears of investors who worry about economic pressures on Wal-Mart's customers.

You can tell by their commentary, their commitment to everyday low price, it seems like they're going to get more aggressive with pricing actions coming up, said ITG Investment Research analyst John Tomlinson.

Recent analyst reports suggested the gap between its prices and competitors' prices has narrowed in areas such as food.

Wal-Mart is also increasingly using everyday low pricing in international markets. In countries such as Brazil, it is introducing the practice of having low prices all the time rather than focusing on limited time discounts.

Still, the United States remains its biggest market, accounting for 62.1 percent of sales last year, and many of Walmart's U.S. customers are struggling.

They're trading down to stretch their budgets, buying a lower-priced brand of detergent, moving from branded canned goods to private label and purchasing half gallons of milk instead of gallons, Chief Executive Mike Duke said during a recorded call.

MORE GOVERNMENT ASSISTANCE

More shoppers are also relying on government aid to help them pay for food and other necessities, and are shopping less often to save money on gasoline, said U.S. CEO Bill Simon.

U.S. shoppers' biggest economic concerns are job security, the rising cost of food and the high price of gasoline, Chief Financial Officer Charles Holley told reporters.

The number of shoppers relying on government aid has risen over the last two and a half years, Holley said, noting that unemployment levels have been higher for people who had less education and less income to begin with.

Second-quarter sales at Wal-Mart's U.S. discount stores open at least a year, excluding fuel, fell 0.9 percent, marking the ninth straight quarterly decline as the chain tries to lure back bargain hunters. (Graphic on U.S. Walmart same-store sales: http://r.reuters.com/bad33s)

The decline was near the low end of Wal-Mart's forecast of down 1 percent to up 1 percent. Analysts on average expected a decline of 0.6 percent, according to Thomson Reuters data.

Even though Walmart's U.S. same-store sales were worse than competitors such as Target Corp, dollar stores and warehouse chains, Walmart gained momentum, said Wall Street Strategies analyst Brian Sozzi, who upgraded the shares to hold from sell.

Wal-Mart said U.S. same-store sales improved each month during the quarter and were up in July. Fewer customers visited the stores, but those who shopped spent more on average.

Wal-Mart appears to be taking the right steps, including pricing changes, growing its international business and opening more smaller stores. But the stock may be too pricey for some as it is hard to see substantial changes in such a large company, said Larry Carroll, president of Carroll Financial, based in Charlotte, North Carolina.

I'm neutral on it, and if it were 10 or 15 percent cheaper, I'd be inclined to buy it, said Carroll, who has owned Wal-Mart in the past.

Shares were up $1.70 at $51.68 in afternoon trading. Shares of Home Depot Inc, which also reported better-than-expected quarterly results, climbed as well.

PROFIT UP

The world's largest retailer earned $1.09 per share from continuing operations, up from 97 cents a year earlier and near the high end of its forecast.

Excluding items, earnings were $1.12, compared with the average analyst estimate of $1.08, according to Thomson Reuters I/B/E/S. Sales rose 5.5 percent to $108.64 billion.

For the year, Wal-Mart expects a profit of $4.41 to $4.51 a share, compared with its previous forecast of $4.35 to $4.50.

The company forecast a profit of 95 cents to $1 per share for the third quarter, and said Walmart U.S. same-store sales in should be down 1 percent to up 1 percent this quarter.

The goal is still for same-store sales in that unit to turn positive by the end of the year, the company said.

(Reporting by Jessica Wohl and Brad Dorfman. Editing by Robert MacMillan)