Australian shares gave up gains to trade marginally lower on Tuesday, with weak commodities overpowering gains in financial and technology stocks as investors grew cautious of the U.S. debt ceiling negotiations, which did not come to a tangible conclusion on Monday.

The S&P/ASX 200 index closed 0.05% lower to 7,259.9 points. The benchmark fell 0.2% on Monday.

U.S. President Joe Biden and his Republican counterpart Kevin McCarthy could not find common ground on how to raise the country's $31.4 trillion debt ceiling by the end of the month but vowed to keep the line of communication open.

A failure to reach a deal within the stimulated date could lead to a recession in the world's largest economy, causing a chaotic spillover in financial markets.

"Although Secretary Yellen warned the U.S. could be running out of funds as early as June 1, I think such estimates could very well be conservative," Glenn Yin, Head of Research and Analysis from AETOS Capital Group said.

On the domestic front, gold stocks lagged the most, falling about 1.2%, tracking lower bullion prices globally, with sector majors Newcrest Mining and Northern Star Resources easing about 1.9% and 0.8%.

Additionally, miners fell about 0.8%, due to weak iron ore prices in top steel producer China, with sector majors BHP Group and Fortescue falling 0.7% and 0.5% respectively.

In corporate news, national carrier Qantas fell as much as 3.1%, even as the airlines forecast a record annual profit for fiscal 2023, and increased its share buyback by up to A$100 million. ($67.83 million)

On the bright side, financial stocks firmed around 0.8%, with the "Big Four" banks trading higher in the 0.6% and 1% range.

The technology index advanced about 0.2% to hit a one-month high, with accounting service provider Xero Ltd rising about 0.7%.

New Zealand's benchmark S&P/NZX 50 index fell 0.4% to finish the session at 11,944.2 points. ($1 = 1.4743 Australian dollars) (Reporting by Archishma Iyer in Bengaluru; Editing by Janane Venkatraman)