Resource companies shook off a slowdown in Chinese manufacturing to help the sharemarket finish firmer.
The market took a hit in early afternoon trade after HSBC's purchasing managers index showed industrial activity in the world's second-biggest economy falling to an 11-month low in July.
But the market turned around and at the close the S&P/ASX 200 Index was up 18 points (0.36 per cent) at 5035.1. The broader All Ordinaries rose 17.2 points (0.34 per cent) to 5021.8.
"It certainly was the most surprising thing - we did see an impact, in both the currency and the market - but fortunately we have managed to recover in the late afternoon trade," CommSec analyst Juliette Saly said.
She said resource stocks benefited as gold prices held above $US1330 an ounce.
"We are seeing commodity prices back in favour and that's been helping the mining sector."
Iron ore miner Fortescue outperformed the market, reversing Tuesday's losses to close 4.1 per cent higher at $3.77.
Atlas Iron added 9 per cent to 91¢ after reporting a 16 per cent increase in shipping volumes during the June quarter, with expectations to lift production further.
BHP Billiton also did well, adding 23¢ to $34.73 and Rio Tinto was up 92¢ to $57.68. Among other market heavyweights, Telstra added 5¢ to $5.01.
The market appeared to overlook local data showing headline inflation rising by 0.4 per cent in the June quarter, for an annual increase of 2.4 per cent, with both levels marginally below economists' median forecasts.
Financials performed well, with ANZ up 6¢ to $28.98, Commonwealth Bank 51¢ to $72.90, Westpac 26¢ to $29.75 and NAB 18¢ to $30.67.
Bucking the positive trend, property group Australand lost 5¢ to finish at $3.45 after revealing its net profit fell 1.4 per cent to $88.4 million in the six months to June 30, compared with the same period in 2012. Its shares have fallen since Monday, when its major shareholder, CapitaLand, a Singapore-based real estate group, opted to retain its Australand stake, after a six-month review.
The dollar hit a one-month high, but fell on the release of weak Chinese manufacturing figures. Late on Wednesday it was trading at US92.57¢, down from US92.59¢ on Tuesday.