The sharemarket has lost ground in early trade, as rising oil prices and a flare-up in Middle East tensions reignited inflation concerns.

Shares take a hit, falling more than 1 per cent on opening, as violence in the Strait of Hormuz and worries about overinflated AI stocks weigh on sentiment.

The ASX made up for early losses to close the day slightly lower, as a rising oil price pushed energy shares higher.