The federal government will introduce legislation to repeal the ban on communicating election results while the polls remain open, Minister of State Tim Uppal announced Friday morning.

If passed, the law will make it legal for journalists and social media users to discuss results online and on television, effectively legalizing a practice already common on the Internet.

"Our government is committed to bringing Canadian elections into the 21st Century by getting rid of this dated and unenforceable law," said Uppal, minister of State for Democratic Reform, in a news release on Friday.

"The ban… does not make sense with widespread use of social media and modern communications technology," he posted on his Twitter account shortly after the announcement. "Canadians should have freedom to communicate about election results without fear of heavy penalty."

The existing law, Section 329 in the Canadian Elections Act, specifically prevents the sharing of election results with people in a riding where polls are still open.

It was first adopted in the 1930s to stop voters in western time zones from knowing the results from the vote-rich eastern provinces when they cast their ballots. In some cases, an election could be seen as already decided by the eastern vote.

The fine for violating the law can be as high as $25,000.

However, adherence was much easier to monitor when radio and television were the main sources of election returns information. Internet access is now widespread in Canada.

Parliament has since introduced staggered voting hours across the country so polls close in most places within three hours of each other, instead of four-and-a-half.

Ongoing battle for publication

The pending repeal comes after a decade-long campaign by British Columbia software developer Paul Bryan, who deliberately broke the law in the 2000 election. The B.C. Supreme Court declared the ban unconstitutional in 2003, but that decision was reversed on appeal in 2005.

In a letter circulated in 2001 in support of Bryan, then-private-citizen Stephen Harper reportedly referred to Elections Canada officials as "jackasses" for defending the law.

The appeal court's decision was upheld in the Supreme Court of Canada in 2007, which found Section 329's limit on freedom of expression reasonably justified. The Supreme Court also noted this was a matter that was within Parliament's purview to change.

On Friday, Uppal thanked Bryan for his work on the issue. He said the government planned to see the ban repealed before the next general election, which will likely be held in 2015.

With a majority in the House of Commons, the new Conservative government legislation is nearly guaranteed passage.