A Burlington restaurant owner and a medical marijuana-smoking former customer announced they had come to an out-of-court agreement on Monday just moments before the Ontario Human Rights Commission was set to release its ruling on their case.

Steve Gibson filed a complaint with the commission almost three years ago, saying the owner of Gator Ted's restaurant told him he was not to smoke pot near the restaurant's front door because it was bad for business.

Gibson has a legal exemption to smoke marijuana to relieve spinal pain and lights up every couple of hours. He says he should be allowed to smoke it anywhere he wants except designated no-smoking areas.

The hearing was supposed to start Monday at 10 a.m., but the two sides said they had reached an agreement before it began. They have not released the details because they are still being finalized.

"I can't talk about any of the terms of the settlement but it looks like I got everything I initially asked for with respect to my rights," Gibson told CTV Toronto as he left the commission's building on University Avenue.

Gator Ted's owner Ted Kindos said he had no chance but to settle because of the financial toll the legal battle was taking on his business. He said the fight has cost him tens of thousands of dollars.

"We're a small independent business and we couldn't be away from it for that long and take the financial strain at the end," he told CTV Toronto, saying he plans to examine other options to prevent pot smoking outside his business. "We will still pursue the Ontario and federal governments... to make sure this never happens again."

In the meantime, Gibson says he plans to return to Gator Ted's.

"I do believe that I'll go back to Gator Ted's to prove a point and have a beer where I've always enjoyed having one," he said.

With a report from CTV Toronto's MairiAnna Bachynsky