"In the wake of last night's attacks we've heard more suggestions that all Muslims in America be targeted, tested for their beliefs, some deported or jailed," Mr Obama said.

The US president was referring to a suggestion by Former US House of Representatives Speaker Newt Gingrich that all US Muslims should be tested to see if they believed in Sharia - deporting those who did. Mr Obama said "the very suggestion is repugnant and an affront to everything that we stand for as Americans".

He went on: "We cannot give in to fear or turn on each other or sacrifice our way of life. We cannot let ourselves be divided by religion because that's exactly what the terrorists want. We should never do their work for them."