The mosque said in a statement that the man was also armed with “an array of other sharp weapons.”
Parishioners suffered minor injuries from the bear spray, according to police.
“Members of the mosque quickly incapacitated the man before the police arrived,” the police said in a statement.
Investigators considered “all possible motives, including hate motives” for the attack, which turned out to be a “separate incident,” police said. Charges have been filed.
The police will remain “in the area to calm the community and the mosque and provide additional support,” the statement said.
Mississauga is located about 15 miles southwest of Toronto in the province of Ontario.