Two men, including one who has 25 wives and 146 children, were convicted of polygamy on Monday in a landmark ruling that upheld Canada's longstanding ban on the practice.

Winston Blackmore and James Marion Oler, who has five wives, face up to five years in prison after being found guilty in the first real test of the country's polygamy law, enacted 127 years ago.

Three special prosecutors had been appointed over the past two decades to consider bringing charges against the pair, but they backed down over concerns that the law prohibiting polygamy violated Canadians' constitutional right to religious freedom.

Those fears were assuaged in 2011 when British Columbia province's Supreme Court ruled in a reference case that the inherent harms of polygamy justified putting limits on religious freedoms, clearing the way for charges to be filed against Blackmore and Oler three years later.