A group of amateur hockey players has reached a settlement with the NHL over what happens to the Stanley Cup if the league doesn't play.

Tim Gilbert, who was representing Gard Shelley and David Burt in the case against the NHL, told the Canadian Press that a settlement had been reached. A court hearing had been scheduled Tuesday.

The agreement, according to the Canadian Press, acknowledges that Stanley Cup trustees Brian O'Neill and Ian Morrison can, but are not obligated to, award the Cup to a non-NHL team in years the league does not operate.

The NHL will also contribute $100,000 a year to hockey leagues for women and underprivileged children during the next five years, the Canadian Press reported.

"A David and Goliath story," Gilbert told the Canadian Press of the victory.

The "Wednesday Nighters" filed a claim in Ontario Superior Court last spring, asking it to clarify the terms under which Canadian Governor-General Lord Stanley donated the Cup in 1892. The 2005 NHL season was canceled amid a labor dispute.

"We do not take this lightly," said Shelley, an amateur hockey player in his mid-50s said last spring. "The Stanley Cup is the greatest sports trophy anywhere, ever. It is unique and a huge part of our culture and heritage."

Last year, O'Neill said there was no legal way the trophy could be awarded for another competition under an agreement with the NHL. He said it would only be possible if the NHL decided it didn't want the Stanley Cup anymore, or if the league went out of business.

Besides 2005, the only other time the Stanley Cup was not awarded was 1919, when a flu epidemic forced the finals

to be called off.

The Associated Press contributed to this report.