Joel Ifergan entered at a convenience store in Montreal this past May, looking to strike it rich in a $27-million Super 7 jackpot.

It turns out seven was far from his lucky number.

Store owner Mehernosh Iranpor told Ifergan he didn't have much time left to purchase tickets for that night's draw.

"He just walked in and he asked me how much time is left," said Iranpor. "So I told him there's about one minute to go sir. He says, 'Give me two tickets plus one extra.'"

But one of the tickets popped out of the machine at seven seconds past 9 p.m. -- that's seven seconds after Loto-Quebec's deadline.

"I asked him, 'You want to cancel it?' (and) he said, 'No, I'm going to keep it,'" Iranpor said.

"The next morning he came back with a long face. I said, 'What happened?' (and) he said, 'I got all of the seven numbers.'"

Ifergan told CTV Montreal his reaction was mixed: first excitement, then frustration.

"It felt great for about 10 seconds, then I realized the date and now I feel very, very frustrated by the system," he said.

"When we met with a Loto-Quebec lawyer and two of their technicians at the depanneur, they told us there was a 10 to 12 second delay in transmission time."

That being the case, Ifergan believes Loto-Quebec owes him $13.5-million.

"My purchase and request for the tickets was done, if we calculate it backwards, approximately 8:59:43," he said. "Due to transmission delays it was processed at 9:00:07."

Ifergan said he is taking the matter to court after his lawyer spoke with the lottery company, who refused to settle the case.

Loto-Quebec refused to comment on the case and it will now be decided by a superior court judge.