Aaron Driver was said to be in the final stages of a bomb plot
A Canadian terror suspect detonated a bomb in the back seat of a taxi as police closed in on Wednesday, authorities say.
Aaron Driver wounded himself and the cab driver, before police opened fire during the confrontation in Strathroy, Ontario, said officials.
The Royal Canadian Mounted Police (RCMP) told a news conference that Driver was in the final stages of a homemade bomb plot.
Deputy Commissioner Mike Cabana said the FBI had supplied them with credible information, including a "martyrdom" video.
He said the evidence suggested Driver had planned a suicide attack within 72 hours targeting an unspecified urban centre during rush hour.
"Obviously it was a race against time," Mr Cabana told reporters.
RCMP Commander Jennifer Strachan said Driver was intercepted by police as he entered a cab with a backpack.
It is unclear if Driver died as a result of the explosion or police gunfire.
Authorities aired video evidence during a news conference in Ottawa on Thursday.
It showed a masked man, identified by investigators as Driver, decrying western "enemies of Islam" and quoting Koranic verses.
"Oh Canada, you received many warnings, you were told many times what would become of those who fight against the Islamic State," the person in the video said.
The suspect warned the only solution would be the "spilling of your blood".
The US Ambassador to Canada, Bruce Heyman, said in a statement the case reflected "strong cross-border law enforcement cooperation" between the two North American countries.
"Our partnership reflects our joint commitment to protecting the safety of our citizens," he added.
Driver - who converted to Islam in his teens - was described by the authorities as a known sympathiser of the so-called Islamic State.
He was placed under a terrorism-related peace bond this year, after he was arrested in Winnipeg in June 2015 for openly supporting the Islamic State group on social media.
Driver - who used the alias Harun Abdurahman - was also allegedly in contact in 2015 with a UK-born youth who was later arrested for an alleged Australian terror plot.
His estranged father, Wayne Driver, told news outlets he was saddened by his son's death but not surprised.
"Our worst nightmare has come true," Mr Driver told the National Post newspaper. "Aaron was a good kid who went down a dark path and couldn't find the light again."