U.S. stocks eked out a tiny advance Tuesday, with AT&T, J.P. Morgan and Merck among the gainers in the conclusion of a bruising month for the market.

The Dow Jones Industrial Average edged up 4.99 points, or 0.05%, to 10014.72 Tuesday but tumbled 4.31% on the month, marking its first August drop in five years.

August turned out to be the second-worst month of the year for the Dow Jones Industrial Average behind May, and the measure is now off 3.96% for the year.

The Dow's technology components were the biggest weight on the Dow for August, with Hewlett-Packard dropping 16%, Intel sliding 14% and Cisco Systems declining 13% in the month.

The swoon has come on a steady trail of disappointing economic data that have gotten investors increasingly worried about whether the economy could be headed toward a double dip. Still, with the Dow managing to edge up slightly Tuesday, its gainers were led by AT&T, which rose 40 cents, or 1.5%, to 27.03, while J.P. Morgan Chase advanced 51 cents, or 1.4%, to 36.36, and Merck added 43 cents, or 1.2%, to 35.16.

The Standard & Poor's 500 index rose 0.41, or 0.04%, to 1049.33, with gains in its telecommunications and financial sectors offsetting declines across its health care and technology categories.

The S&P 500 dropped 4.74% this month, with its financial sector hit the hardest over the period. Just two sectors rose in August: telecommunications and utilities.

The Nasdaq Composite declined 5.94, or 0.28%, to 2114.03, on Tuesday, and it dropped 6.24% for the month of August.

European market

European stocks erased significant losses to finish higher Tuesday after data showing a rise in U.S. consumer confidence allayed near term concerns over the pace of the economic recovery. The Stoxx Europe 600 index finished up 0.1% at 251.31 points, rebounding from an intraday low of 247.82.

The index has dropped 1.6% this month. U.S. consumer confidence increased to 53.5 in August, beating market expectations, the Conference Board reported.

Still, economists at Commerzbank cautioned investors not to read too much into the increase, pointing out that consumer confidence has more or less trended sideways since May 2009, when the index was at 55.

Earlier in the session, U.S. housing data started turning sentiment. It showed that the prices of single family homes in 20 major American cities rose in June.

European and U.S. stock markets welcomed the break in a stretch of bad news about the U.S. economy over the past few weeks. The U.K.'s benchmark FTSE 100 index closed up 0.5% to 5,225.22 points.

The French CAC 40 index gained 0.1% to 3,490.79 and Germany's DAX 30 climbed 0.2% to 5,925.22 Banking shares reduced their losses in afternoon trading, Barclays PLC fell 0.5% in London and Credit Agricole declined 2.4% in Paris.

Shares of Greek lender Alpha Bank fell 0.2% after it reported that losses on bad loans continued to increase in the second quarter and profit fell 62%.

Asian market

Asian stock markets mostly declined Tuesday, with Japanese shares finishing at a fresh 16 month low as investors fretted over the adverse impact of a rising yen on the nation's economy and exporters.

The day started on a poor note for regional markets after soft U.S. data including weak readings on personal income and Texas area manufacturing activity triggered a sell off on Wall Street and hurt investor sentiment.

Analysts said the markets were looking past last week's comments from U.S. Federal Reserve Chairman Ben Bernanke that the Fed would act decisively to prevent the U.S. economy from sliding sharply.

The Nikkei Stock Average tumbled 3.6% to 8,824.06 for its lowest close since late April 2009.

The benchmark shed 7.5% in August to become the worst performer among major Asian indexes. Hong Kong's Hang Seng Index fell 1.0%, resuming its decline a day after it snapped a six session losing streak, while China's Shanghai Composite slipped 0.5%. South Korea's Kospi declined 1.0%.

Tokyo stocks were weighed by Wall Street's fall, as the yen remained stubbornly strong amid a market view that the Bank of Japan's efforts Monday to further ease its monetary policy were inadequate, pressuring companies that depend on offshore sales.

Among the exporters caught in the selloff, Canon lost 4.5% and Toshiba shed 4.4%.

Commodities and metals

Copper pared its losses on the London Metal Exchange Tuesday after fresh U.S. data showing a rise in consumer confidence helped to somewhat ease concerns over the global recovery.

The metal tracked a recovery in global equities, which erased considerable losses, after the Conference Board said its index of consumer confidence rose to 53.5 in August from a revised 51.0 in July.

The reading was better than the 51.0 expected by economists surveyed by Dow Jones Newswires.

The report pushed LME copper higher, helping the metal close only 0.2% lower than Friday's PM kerb.

At its intraday low, the metal had been down 1.3% on the kerb close. Aluminum and lead also managed to pare some of their losses for the day.

Aluminum which traders said had been finding decent buying support despite concerns over significant downside risk managed to buck the trend lower by base metals, closing a marginal 50 cents higher on the day.

Crude futures tumbled Tuesday, settling below $72 a barrel as investors turned their attention toward increasingly high U.S. oil supplies and the slowing economy. Light, sweet crude for October delivery settled $2.78, or 3.7%, lower at $71.92 a barrel on the New York Mercantile Exchange.

Brent crude on the ICE futures exchange traded down $1.99, or 2.6%, at $74.61 a barrel. Traders are beginning to doubt that oil demand will stage a substantial recovery during the second half of the year, after first half consumption came in lower than expected.

The value of oil to be delivered during the remainder of 2010 is starting to fall faster than oil available further in the future, indicating a growing belief that short term demand will remain weak.

Gold futures crept closer to record highs, rising on continued insecurity about the economic recovery as global equity markets struggle.

The most actively traded contract, for December delivery, settled up $11.10, or 0.9%, at $1,250.30 an ounce on the Comex division of the New York Mercantile Exchange, the highest settlement price since June 28.