The two Britons killed Tuesday in Nuristan province, 100 miles east of the capital, Kabul, were employees of Global Risk Strategies, a British-based security company.
"Both of the individuals involved were British nationals, working alongside the United Nations," the company said in a statement. It didn't release their names.
The deaths were the first among Afghan and foreign staff preparing the country's first post-Taliban election, slated for September. Details of the attack were unclear. But the U.S. military has warned repeatedly that Taliban-led militants were trying to derail the process.
The company is surveying parts of rural Afghanistan as part of U.N. plans to register voters for September elections.
The United Nations is pressing ahead with plans to register 10 million Afghan voters across the country, despite a surge in violence by Taliban-led militants.
The world body has already registered almost 2 million Afghans in eight major cities for the election, but only began on Saturday to sign up voters in the lawless countryside.
The world body has warned that the vote will fail if security is not improved, and has already had to suspend or delay registration work in the south and east of the country in response to several attacks.
Nuristan is one of four troubled provinces along the Pakistani border where registration was delayed because of poor security, Wardak said last week.