OTTAWA - A Quebec man who bought a Lotto Super 7 ticket seven seconds after the deadline won't be able to collect half the $27-million jackpot and will also have to cover the court costs after the Supreme Court dismissed his case Thursday.

Joel Ifergan sued Loto-Quebec for $13.5 million, but Canada's top court wouldn't hear his arguments.

Ifergan went to the Montreal convenience store to buy two lottery tickets on May 23, 2008. The clerk told him he had to act quickly because the 9 p.m. deadline was quickly approaching.

The first quick pick was printed in time, but the second was printed seven seconds after the deadline and indicated it was for next week's draw.

The store employee asked Ifergan if he still wanted to purchase the tickets. He said he did and paid for them.

Unfortunately for Ifergan, the winning numbers for the $27-million jackpot appeared on the second ticket.

Another person had the winning numbers for the May 23 draw, which is why Ifergan sued for half the winnings.

Ifergan claims that once his order for the two tickets was placed in the terminal for the May 23 draw, the lottery provider was obligated to provide them for that date.

In May 2014, the Quebec Court of Appeal also rejected his case.

Mehernosh Iranpur", owner of the west Montreal store where Ifergan bought the ticket, said Loto-Quebec's terminals" are the problem.

They're not synchronized with the store clocks, said Iranpur, and even though his clock read 8:59 when he processed the tickets, he said the lottery ticket machine was one minute ahead.

He said Ifergan might have won his jackpot had Loto-Quebec adopted a system like other jurisdictions, where terminals automatically shut down for 10 minutes at lottery deadlines.

Ifergan lives right behind the store and was once a regular client, but hasn't shown up lately.

"I've not seen him for six months," said the storeowner. "He must be depressed. Absolutely depressed."

— with files by Brian Daly