Islamist extremist groups in UK were funded by hundreds of thousands of pounds of taxpayers' money earmarked to counter terrorism, it has emerged.

According to a government report, radical Islamists were bankrolled with money that should have been used to combat their anti-Western ideology.

The money was spent as part of the Prevent programme, which was funded with hundreds of millions of pounds to try to stop young Muslims from becoming radicalized, The Daily Mail reports.

Home Secretary Theresa May launched a withering attack on the failures of Prevent program. She said it was 'flawed' and vowed to end all funding for extremist groups.

"It failed to tackle the extremist ideology that not only undermines the cohesion of our society, but also inspires would be terrorists to seek to bring death and destruction to our towns and cities," May said in a statement.

"And in trying to reach out to those at risk of radicalization, funding sometimes even reached the very extremist organizations that Prevent should have been confronting," May said.

"We will not make the same mistakes. Under this Government, public money will not be provided to extremist organizations," she added.

May also pledged not to give money to anyone who do not support British values of democracy, human rights and equality before the law.

The report said that audit trails for Prevent money were so bad that as yet unidentified sums of money may have reached extremists.

The report identified 25 priority areas in England, including Birmingham, Blackburn, Leicester and 16 London boroughs, which will be targeted with counter-terror funding.