The ASX has bounced back from its early losses to close slightly higher, powered by strong gains by goldminers and oil producers as both commodities moved higher amid tension in the Middle East.

The benchmark S&P/ASX200 index fell 61.8 points in the first 11 minutes of trading on Monday but moved steadily higher most of the rest of the day to close up 2.2 points, or 0.03 per cent, at 6,735.7.

The broader All Ordinaries also finished up 2.2 points, closing at 6,857.4 points.

The Australian dollar is buying 69.40 US cents, down from 69.63 US cents on Friday.