Superior courts in B.C. and Quebec have ordered judicial recounts in two federal ridings following close races where the winning and losing candidates were separated by only a few hundred votes.

Elections Canada said recounts were granted after requests from the second-place candidates in the riding of Port Moody-Coquitlam, about 25 kilometres east of Vancouver, and in the Montreal riding of Hochelaga.

In Port Moody-​​​Coquitlam, Conservative candidate Nelly Shin had 153 more votes than NDP candidate Bonita Zarrillo, according to official Elections Canada results.

Liberal candidate Soraya Martinez Ferrada led Bloc Québécois candidate Simon Marchand by 328 votes in Hochelaga.

The Bloc Québécois also requested a recount in a third riding, Quebec, where Liberal candidate Jean-Yves Duclos beat Bloc challenger Christiane Gagnon by 325 votes. A court hearing set for tomorrow will determine whether that recount will proceed.

Under Elections Canada rules, an automatic recount is triggered when the difference in the number of votes received by the top-finishing candidates equals 0.1 per cent or less of the total number of votes cast.

A requested recount can be granted when a candidate or voter asks a judge for one within four days of the release of the validated results.

A source in the Bloc who was not authorized to speak publicly said earlier this week there were discrepancies between the final result and the number of votes counted in the ballot boxes in the two Quebec ridings it is challenging.

In Port Moody-Coquitlam, the NDP alleges there were counting errors at multiple polling stations.