Two American soldiers were killed when a man in Afghan army uniform fired at a group of soldiers, US authorities said on Saturday.

Six others were injured. The shooting took place in Nangarhar province, where an American-Afghan group of soldiers returned from a military operation, according to a spokesperson for the US forces in Afghanistan.

"We are still collecting information. The cause and motive of the attack is still unknown," said the spokesperson.

Two weeks ago an American plane crashed in Afghanistan, killing at least two people. The Taliban claimed responsibility for the crash of that plane, but American authorities have always denied that.

The United States has been negotiating with the Taliban in Afganistan for months about a peace agreement. A truce was agreed at the end of last year.