A Canadian man who was denied part of a $27 million jackpot because he missed the deadline to buy the ticket by seven seconds has lost his appeal to get the money.

The Supreme Court of Canada ruling has ended a seven-year legal battle by Joel Ifergan, an accountant, to claim his share of the prize.

Mr Ifergan went to a local convenience store just before 9:00pm on May 23, 2008 to purchase tickets for that night's 'Lotto Super 7' draw.

The store clerk told him to hurry before the deadline, according to a court summary.

While the clock on the lottery terminal read 8:59pm, only one of the two tickets was registered in time.

The second ticket, the winning one, was printed and registered on the Loto-Quebec computer at seven seconds after 9:00pm, eligible for the following week's draw.

The store clerk told Mr Ifergan that only one ticket was registered in time and asked if he still wanted to buy the second ticket. Mr Ifergan said he did, and paid for both.

After he was denied half of the lottery jackpot, which was awarded to another winner, Mr Ifergan sued Loto-Quebec for the processing lag.

The case has been working its way through Canada's courts.

The Supreme Court did not comment on the case.

Reuters