Ottawa (AFP) - Canadian police said they thwarted a "potential terrorist threat" after shooting dead an alleged Islamic State sympathizer said to have been armed with an explosive device.

Media reports said 24-year-old Aaron Driver was shot to death Wednesday night during a police raid on a home in Strathroy, Ontario, 220 kilometers (135 miles) southwest of Toronto, where he lived with his sister.

Driver's father confirmed that his son had been shot and killed, telling the National Post "the police did what they had to do. He would not surrender. I'm sure they gave him ample chances."

"As sad and shocked as I am, it doesn’t surprise me that it has come to this. Aaron was a good kid who went down a dark path and couldn’t find the light again," the father, who was not named, was quoted as saying.

A relative told Canadian public broadcaster CBC that police informed the family that he was shot dead after detonating an explosive device, injuring himself and one other person.

They said they had to shoot Driver because he had a second device which he was planning to detonate, according to the CBC.

The other injured person was reported to be a taxi driver, but it was unclear what his connection was to the suspect.

Broadcaster CTV, citing internal government documents, said the suspect allegedly had been planning to set off an explosive device in a packed public space in a major city.

"Earlier today, the RCMP received credible information of a potential terrorist threat. A suspect was identified and the proper course of action has been taken to ensure that there is no danger to the public's safety," the Royal Canadian Mounted Police (RCMP) said in a statement.

Hours earlier, authorities had alerted Toronto's transit system of a "credible terrorist threat," Brad Ross, a spokesman for the Toronto Transit Commission, told CTV Thursday.

Police have beefed up their presence on the network of subways, bus lines and street cars in Canada's largest city, used by 1.8 million people a day.

Story continues

Canadian authorities had issued a public warning late Wednesday of a "potential terrorist threat," and said a suspect had been arrested but provided no details.

- 'A lone wolf' -

Driver was described in media reports as a Muslim convert with a troubled childhood who became radicalized on the internet.

"It was like he turned out the lights and put a 'Do Not Disturb' sign on the door," his father told CBC in interviews last year with his son.

"When he was living at home, he was very secretive; a lone wolf. He didn't bring friends over, never talked about where he was going and what he was doing," the father said.

Driver came to the attention of Canadian authorities in 2014 after posting tweets in support of the Islamic State group and justifying a Muslim convert's killing of a sentry at Canada's national war memorial during an October 2014 attack that spilled into the nearby parliament building.

"If a country goes to war with another country or another people or another community, I think that they have to be prepared for things like" the Ottawa attack, he told the CBC in last year's interview.

"And when it does happen they shouldn't -- they shouldn't act surprised. They had it coming to them; they deserved it."

He was arrested in June 2015 and released under court supervision.

He was ordered to undergo counseling from a religious leader, wear an electronic monitoring bracelet and stay off the internet. Those restrictions were gradually loosened and were scheduled to expire this month.

According to the order, a peace bond which was signed in February, there were "reasonable grounds to fear that he may participate, contribute directly or indirectly in the activity of a terrorist group," the Canadian Press news agency said.

- Unfolding probe -

The RCMP said an investigation was under way as the matter "continues to unfold." No other details from officials were immediately available. A press conference was due later Thursday.

Public Safety Minister Ralph Goodale said Canada's terrorism threat level remains at "medium," a ranking which it has maintained since October 2014 after lone wolf attacks by suspected jihadists in Quebec and Ottawa.

In the first attack, on October 20, 2014, a 25-year-old Muslim convert ran down two soldiers in a parking lot in Saint-Jean-sur-Richelieu, some 40 kilometers (25 miles) southeast of Montreal, before being shot dead by police. One of the soldiers later died.

Two days later, another Muslim convert, aged 32, killed a ceremonial guard then tried to storm Canada's parliament before being shot dead by security guards only meters (yards) from a room where the prime minister and his caucus were meeting.

The Conservative government responded by passing a bill that gives the RCMP and Canada's spy agency sweeping powers to thwart terror plots and prevent Canadian youth from flying overseas to join IS militants in Syria.

Canada joined the US-led coalition against IS in September 2014.

After unseating the Tories in an election last year, Prime Minister Justin Trudeau scaled back Canada's participation in the coalition, ordering the withdrawal of Canadian fighter jets but increasing the number of military trainers in Iraq.