US and Afghan troops came under "direct fire" in eastern Afghanistan late Saturday, a US military official said, in an incident that apparently caused multiple casualties.

The nature of the violence was not immediately clear. One Afghan official said the two sides had "clashed", while another source told AFP an Afghan commando had opened fire at the Americans.

"A combined US and Afghan force conducting an operation in Nangarhar Province was engaged by direct fire on Feb. 8", US Forces-Afghanistan spokesman Colonel Sonny Leggett said in a statement.

"We are assessing the situation and will provide further updates as they become available."

In the past, US forces have been targeted in so called "insider" attacks -- where Afghan security forces target international soldiers with whom they are working.

"An Afghan commando opened fire," a local security official told AFP, adding that the shooting lasted a long time.

An official in Nangarhar meanwhile said the attack happened in the Shirzad district military headquarters, and that foreign forces had cordoned off the area.

"Several helicopters landed in and departed from the HQ compound taking out casualties. We don't know how many killed or wounded," the official told AFP.

A second Nangarhar official said: "This evening Afghan and US forces clashed in Shirzad district of Nangarhar. We believe there are casualties".

The latest incident comes even as US and Taliban negotiators are seeking to reach a deal that would allow the United States to withdraw thousands of troops from Afghanistan after more than 18 years of war.

In this file photo taken on June 6, 2019, US soldiers look out over hillsides in Nerkh district of Wardak province; US and Afghan troops have come under "direct fire" in eastern Afghanistan, a US military official says
In this file photo taken on June 6, 2019, US soldiers look out over hillsides in Nerkh district of Wardak province; US and Afghan troops have come under "direct fire" in eastern Afghanistan, a US military official says AFP / THOMAS WATKINS

Last year was the deadliest for US forces in Afghanistan since combat operations officially finished at the end of 2014, highlighting the challenging security situation that persists.

In December, Taliban infiltrators in the Afghan military killed nine Afghan soldiers in central Afghanistan.

In July, an Afghan soldier killed two US troops as they were visiting an Afghan army base in Kandahar.

US President Donald Trump has long questioned the wisdom of keeping troops overseas and has described the war in Afghanistan launched after the September 11, 2001 attacks as a drain on blood and treasure.

But last year he cancelled a previously unannounced summit at the Camp David presidential retreat with the Taliban because of an attack that killed an American.

He later allowed veteran US negotiator Zalmay Khalilzad to resume the talks, which had taken place for months in Qatar.

As talks have fluctuated, violent attacks in the country have raged, with the number of clashes jumping to record levels in the last quarter of 2019, according to a recent US government watchdog report.

Also Saturday, at least four police officers and two civilians were killed when a Taliban suicide bomber targeted a police checkpoint in Helmand province, according to the provincial governor's spokesman Said Omar Zwak.