Image copyright AP Image caption Aaron Driver was subject to a court order limiting his activities

Police have shot dead a suspect in an anti-terror operation in the Canadian province of Ontario.

The Royal Canadian Mounted Police (RCMP) confirmed that a suspect was fatally shot in a police operation.

Canadian media said police had raided a property in Strathroy, about 225km (140 miles) south-west of Toronto.

They named the suspect as Aaron Driver, 24, who was arrested last year for openly supporting so-called Islamic State on social media.

'Potential threat'

A senior police official told the Canadian Press news agency the suspect had allegedly planned to carry out a suicide bombing in a public area.

Image copyright AP Image caption Armed police were seen outside a property in Strathroy, Ontario

An internal government memo seen by the CTV network said his alleged plan was to use a homemade bomb to create mass casualties.

An earlier The RCMP statement said it had 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," it added.

"As this is still an unfolding matter and the investigation is still under way, we are not able to provide further comment at this time."

CBC News said Aaron Driver's family had confirmed his death.

It said police had told the family Driver had detonated an explosive device, injuring himself and another person.

Driver had been intending to detonate a second device and that was why police had shot him, the report said.

Leonard Tailleur, Driver's former lawyer, said it was "absolutely shocking" to hear about what happened.

Mr Tailleur, who represented Driver in 2015 and early 2016, said his client had never indicated he would engage in terrorist activities.

"He was such a passive individual. He was not an aggressive person," he told the Globe and Mail.

Who is Aaron Driver?

A 24-year-old living in Ontario known to Canadian police as an IS sympathiser

Canadian Security Intelligence Service (CSIS) first learned of him when he tweeted support for IS under the alias Harun Abdurahman in October 2014

Arrested last June in Winnipeg over concerns of his online activities, but never formally charged

Agreed to a peace bond to limit his activities, which included no use of firearms, a cell phone, computer or social media and no communications with IS

Driver, a Muslim convert, came to the authorities' attention in 2014 for tweeting in support of IS, using the alias Harun Abdourahman.

He was taken into custody and interrogated by police in July 2015 over concerns he would become involved in planning an attack.

He was not charged but released on bail and had to wear a GPS ankle bracelet and undergo religious counselling, according to the CBC.

The electronic tag was removed in February when he agreed to the terms of a court order limiting his activities because there were reasonable grounds to believe he might aid a terror group or terrorist activity.

He was not allowed to have a computer or mobile phone until the end of August and was banned from social media sites and from contacting IS or any other militant groups, the Winnipeg Free Press reports.

All the conditions of the bond were due to expire in December - and no trial was planned.

How do countries handle terror suspects?