Microsoft Corp. and Facebook Inc. have agreed to help boost the security of Canada's October election by removing fake accounts and cracking down on bots, a top government official said on Monday.

The measures are outlined in a nonbinding declaration on electoral integrity, Democratic Institutions Minister Karina Gould told legislators.

Last month Gould complained the world's major social media companies were not doing enough to help combat potential foreign meddling in the election and said the government might have to regulate them.

"The Wild West online era cannot continue — inaction is not an option. Disinformation must not stand," said Gould. Government officials say they fear Russian actors will try to interfere in the vote.

Microsoft and Facebook had also agreed to intensify efforts to combat disinformation, promote safeguards to address cybersecurity incidents and explain their rules about accepting political advertising, Gould said.

"I urge other platforms to follow suit in the coming days," she added in a clear reference to Twitter Inc and Alphabet Inc.'s Google.