OTTAWA (Reuters) - 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.

Slideshow ( 4 images )

Last month the Liberal government of Prime Minister Justin Trudeau complained that the world’s major social media companies were not doing enough to help combat potential foreign meddling in the vote and said Ottawa might have to regulate them.

Democratic Institutions Minister Karina Gould told legislators that the two companies had made commitments in a voluntary declaration on electoral integrity.

“The Wild West online era cannot continue - inaction is not an option. Disinformation must not stand,” said Gould, repeating the threat to crack down on the firms if necessary.

Government officials say they fear bad actors - some linked to Russia - will try to interfere in the vote.

“The malicious, multi-faceted and ever-evolving tactics constitute a serious strategic threat,” said Gould.

Microsoft and Facebook had also agreed to intensify efforts to combat disinformation, promote safeguards to address cyber security 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.

Asked how she could ensure compliance given that the declaration is non-binding, Gould said the keen interest of the public, media and political parties would hold these platforms to account in the short term.

“I think they have an absolute interest to be good actors in the Canadian democratic space, and if that is not the case then we will be coming back with stronger regulatory reforms,” she told reporters, without giving further details.

Sources told Reuters earlier this month that Canadian security services were alarmed by what they see as a potential weakness in political parties’ cyber networks.

Polls suggest the Liberals could lose the election to the official opposition Conservatives.