LONDON - An Afghan policeman killed five British soldiers at a checkpoint in Afghanistan and the Taliban said he was one of their fighters who had infiltrated the force.

The gunman opened fire at a military compound in Helmand province on Tuesday, a day after Afghan election officials canceled a run-off vote in disputed presidential elections and gave President Hamid Karzai a second term in office.

British soldiers returned fire but the policeman escaped and is still at large, a defense ministry spokeswoman said. An investigation into the shooting is under way.

It appears that they were targeted because they were engaged in what our enemies fear most -- they were mentoring and training Afghan forces, British Prime Minister Gordon Brown told parliament.

The Taliban have claimed responsibility for this incident, so it may be that the Taliban have used an Afghan police member or that they have infiltrated the Afghan police.

A Taliban spokesman said the policeman was one of its fighters and they would carry out more such attacks.

It's a new Taliban tactic, we have more Taliban who have infiltrated into the police and army, spokesman Qare Mohammad Yousuf said.

Yousuf added he did not know whether the man who opened fire on the British soldiers was alive or dead.

Afghan Interior Minister Haneef Atmar said the attack appeared to be an isolated incident. U.S. General Stanley McChrystal, commander of U.S. and NATO forces in Afghanistan, said it would not force a change in the training policy.

We will not let this event deter our resolve to building a partnership with the Afghan National Security Forces, he said.

Escalating violence in the U.S.-led war, a sharp rise in British casualties over the summer and concerns over corruption in Karzai's government have created a political headache for Prime Minister Gordon Brown before an election due by June.

Brown has faced criticism over troop numbers, tactics and equipment levels, including suggestions that a lack of helicopters has put British soldiers at risk.

Former Foreign Office minister Kim Howells, who chairs a parliamentary security committee, said Britain should withdraw most of its troops and focus on security at home.

It would be better to bring home the great majority of our fighting men and women and concentrate instead on using the money saved to secure our own borders (and) gather intelligence on terrorist activities inside Britain, he wrote in an article for the Guardian newspaper on Wednesday.

Britain is the second largest contributor to the NATO mission in Afghanistan, with 9,000 troops fighting the Taliban and helping to train local police and soldiers. A total of 229 British soldiers have died in Afghanistan since 2001.

Afghan election officials canceled a presidential run-off election on Monday after Karzai's rival, former Foreign Minister Abdullah Abdullah, withdrew citing serious concerns about the election.

(Additional reporting by Jonathon Burch and Golnar Motevalli in Kabul; Editing by Charles Dick and Elizabeth Fullerton)