A supporter of Afghan presidential candidate Abdul Rasul Sayyaf records footage on his mobile phone during an election rally in Shakardara district of Kabul province on March 14, 2014

Afghanistan on Sunday expressed anger at the United States for allegedly monitoring almost all the country's telephone conversations after revelations by the Wikileaks website.

Wikileaks editor Julian Assange said on Friday that Afghanistan was one of at least two countries where the US National Security Agency "has been recording and storing nearly all the domestic (and international) phone calls".

The Afghan government responded to the claims by ordering the interior and telecommunication ministries to stop illegal monitoring of calls, and said it would lodge a complaint with the US.

"These activities are an obvious violation of agreements based on technical use of these (telephone) stations," said a government statement.

"Most importantly, it is a violation of the national sovereignty of Afghanistan, and a violation of the human rights guaranteed to all Afghans."

Relations between Afghanistan and the US have been severely strained in recent years over issues of Afghan sovereignty, including detention of Taliban militant suspects in US-run jails.

President Hamid Karzai has also launched bitter attacks on the US for civilian casualties in air strikes, night raids on private houses and alleged abuses by special force commandos.

Much of the criticism has infuriated Washington as Karzai has relied on US military and civilian support since he came in power after the Islamist Taliban regime was ousted in 2001 with US assistance.

"These (telephone) stations are installed in Afghanistan by US and Britain forces for the purpose of combating drug smuggling," the Afghan government said.

"The (Afghan) National Security Advisor has been directed to raise these illegal activities and the anger of Afghan government with the US and seriously investigate the issue."

Afghanistan has seen a huge boom in mobile telephones since the end of the 1996-2001 Taliban era, when there were only a handful of landlines in the whole country.

Karzai is due to step down after a second-round election next month to choose his successor.

In his last year in office he refused to sign an agreed text that would allow about 10,000 US soldiers to stay in Afghanistan after 2014 to help with military training and counter-terrorism.

Revelations that the US monitored all telephone calls in at least one country emerged in March, but no country was immediately named due to security concerns.