OTTAWA: Police arrested and charged a Pakistani gun collector living in Ontario this week, alleging he is a terrorist threat to Canada, the Globe and Mail newspaper reported on Thursday, quoting his attorney.

Muhammad Aqeeq Ansari, a 30-year-old software designer, was arrested on Monday, according to his attorney, Anser Farooq, the Globe reported. The arrest came days after two attacks in Ontario and Quebec that left two Canadian soldiers dead.

Federal officials allege Ansari has ties to militants in Pakistan, that he had amassed an arsenal of firearms, and that he has expressed extreme views on Twitter, according to the Globe. He is being charged under Canada’s Immigration and Refugee Protection Act with being a danger to the security of Canada, the newspaper said.

Farooq and police officials did not immediately respond to requests for comment.

Court records obtained by the Globe show that Ansari last year surrendered 10 firearms to authorities, including rifles and several handguns. It said this was part of a plea bargain to obtain a conditional discharge on charges of illegally storing lawfully acquired firearms. Those proceedings did not include allegations of terrorism, the newspaper said.

Canadian police have been under scrutiny for their handling of suspected extremists since the two attacks last week.

Law enforcement officials have asked for additional powers to investigate and arrest extremists in Canada after the attacks, which police say were committed by radical Muslim converts inspired by Islamic State.