TORONTO -- A court decision that handed the right to vote to more than one million Canadians who have lived outside the country for more than five years will be appealed, the Conservative government said Monday.

In addition, Ottawa said it would seek a stay of the ruling, dashing hopes some expatriates might have had of voting in the byelections scheduled for the end of the month.

"Non-residents should have a direct and meaningful connection to Canada and to their ridings in order to vote in federal elections," Pierre Poilievre, minister of state responsible for democratic reform, said in a statement.

"For over two decades, Canada's policy has limited to five years the length of time someone can be abroad and still vote. That is fair and reasonable."

The application to put the ruling on hold pending the appeal is expected to be heard on June 20.

Last month, Ontario Superior Court Justice Michael Penny struck down parts of the Canada Elections Act that barred Canadian citizens who have lived abroad for more than five years from voting.

Two Canadians living in the United States had launched the constitutional challenge, arguing the five-year rule was arbitrary and unreasonable.

The duo are disappointed with Ottawa's decision to appeal, their lawyer Shaun O'Brien told The Canadian Press.

"We're going to fight against the stay, we're going to fight against the appeal, we're going to put forward the same arguments," O'Brien said.

"Justice Penny's judgment was correct and it's a very strong judgment."

In his decision, Penny said mass murderers have the right to vote but long-term expats, who "care deeply" about Canada, do not.

Penny rejected Ottawa's contention that allowing non-resident Canadians to vote is unfair because those living here are, on a day-to-day basis, subject to Canada's laws and live with the consequences of Parliament's decisions.

The judge also rejected the government's request to put his decision on hold for 12 months.

In its notice of appeal, the federal government says Penny made several legal errors, among them that Parliament is obliged to "facilitate unlimited voting rights" for expatriates.

"The judge (also) made an error of mixed fact and law in concluding that the attorney general's argument was based on the assumption that someone who has not lived in Canada for five years or more is unworthy of the franchise," the notice states.

The rule disenfranchising Canadians abroad for more than five years was enacted in 1993 amid debate about the strength of their ties to Canada and their knowledge of domestic politics.

However, the five-year clock reset for those who returned even for short visits until 2007, when Elections Canada began enforcing the requirement for expats to resume residency in Canada to regain their right to vote abroad if they left again.

In their constitutional challenge, Montreal-born Jamie Duong, 30, of Ithaca, N.Y., and Toronto-born Gillian Frank, 35, of Princeton, N.J., argued they had only left Canada for educational and employment opportunities.

Both said they still have a strong attachment to Canada and a stake in its future.