Anti-war MP George Galloway has been banned from Canada, it emerged today.

A Canadian spokesman confirmed that the Respect MP had been deemed inadmissible on national security grounds and would not be allowed into the country.

Galloway today branded the ban "idiotic" and vowed to fight the ruling with "all means" at his disposal. He is due to give a speech in Toronto on 30 March.

Earlier today the Sun said border security officials had declared Galloway, 54, "inadmissible" because of his views on Afghanistan and the presence of Canadian troops there and would be turned away if he attempted to enter the country.

A spokesman for Citizenship and Immigration Canada said the decision had been taken by border security officials "based on a number of factors" in accordance with section 34(1) of the country's immigration act.

The act states:

"A permanent resident or a foreign national is inadmissible on security grounds for:

(a) engaging in an act of espionage or an act of subversion against a democratic government, institution or process as they are understood in Canada;

(b) engaging in or instigating the subversion by force of any government;

(c) engaging in terrorism;

(d) being a danger to the security of Canada;

(e) engaging in acts of violence that would or might endanger the lives or safety of persons in Canada; or

(f) being a member of an organisation that there are reasonable grounds to believe engages, has engaged or will engage in acts referred to in paragraph (a), (b) or (c)."

Galloway, MP for Bethnal Green and Bow, is consulting the organisers of his north American speaking tour and exploring whether legal action can be taken to overturn the ban.

Jason Kenney, Canada's immigration minister, has the right to exempt people from the act if it is felt that their presence would not be "detrimental to the national interest".

But a spokesman said Kenney would "decline to exercise that discretion" in Galloway's case.

Alykhan Velshi, Kenney's spokesman, said that the act was designed to protect Canadians from people who fund, support or engage in terrorism.

"We're going to uphold the law, not give special treatment to this infandous street-corner Cromwell who actually brags about giving 'financial support' to Hamas, a terrorist organisation banned in Canada," he said. "I'm sure Galloway has a large Rolodex of friends in regimes elsewhere in the world willing to roll out the red carpet for him. Canada, however, won't be one of them."

Responding to the news, Galloway issued a statement headed: "This idiotic ban shames Canada."

The MP said: "This decision, gazetted in Rupert Murdoch's Sun, is a very sad day for the Canada we have known and loved – a bastion of the freedoms that supporters of the occupation of Afghanistan claim to be defending.

"This has further vindicated the anti-war movement's contention that unjust wars abroad will end up consuming the very liberties that make us who we are.

"This may be a rather desperate election ploy by a conservative government reaching the end of line, or by a minister who has not cottoned on to the fact that the George Bush era is over.

"All right-thinking Canadians, whether they agree with me over the wisdom of sending troops to Afghanistan or not, will oppose this outrageous decision.

"On a personal note – for a Scotsman to be barred from Canada is like being told to stay away from the family home.

"This is not something I'm prepared to accept."

Galloway is due to speak at a public forum entitled Resisting War from Gaza to Kandahar, hosted by the Toronto Coalition to Stop the War later this month.

He is also due to speak at a second public forum in Mississauga, west of Toronto, on 31 March.

His proposed visit prompted the Jewish Defence League of Canada to write an open letter to the country's government urging it to do "everything possible to keep this hater away".

In 2006, Galloway was refused entry to Egypt on the grounds of national security after he travelled to the country to give evidence at a "mock trial" of Tony Blair and George Bush.

He was held overnight in a police cell before the authorities changed their minds and allowed him into the country.