What would be Canada's first legal gay marriage ceremony after the decision was immediately scheduled for Tuesday afternoon between two men who had been among those who had brought the legal case.
And retroactively the court decision also recognized two other gay marriage ceremonies that had taken place in Toronto in 2001, declaring those unions valid.
"They're married, as effective today," said Joanna Radbord, a lawyer for some of the couples.
The federal government was putting up no immediate roadblock. Mike Murphy, a spokesman for federal Justice Minister Martin Cauchon, said: "We're examining the ruling...We have to take some time to review it."
The three-person Ontario court ruled that the federal law limiting marriage to heterosexuals violated the 1982 Charter of Rights and Freedoms, part of the Canadian Constitution.
Here's an article about the wedding itself:
The Ontario provincial court decision also retroactively recognized two religious gay marriage ceremonies that took place in Toronto in 2001, ordering the province to register those marriages.
The city of Toronto began issuing marriage licenses to gay couples immediately after the ruling. Toronto lawyer Michael Leshner and Michael Stark were the first to take advantage of the change and were married in the afternoon.
The ruling may still be challenged by the Canadian government. But Justice John Hamilton, who conducted the ceremony, said until that happens the marriage is legal.
"It's the law. They're married now. If the crown appeals and they win well, we'll have to see what that holds. But right now they're married," he told Reuters.
If the ruling is not appealed, the province of Ontario would be the first jurisdiction in North America to legalize gay marriage. Vermont and Quebec have allowed gay civil unions but not full marriage.
Canada's federal government, which is responsible for the marriage law, was putting up no immediate roadblocks.
"I think it's time for us to recognize that same-sex marriages are part of our societal norm," Deputy Prime Minister John Manley said in Ottawa after a cabinet meeting.
If the government had wanted to block gay marriages, it would have to quickly seek a stay of the ruling, while deciding if it wants to appeal.
CANADA MAY STILL APPEAL
Justice Minister Martin Cauchon said he would make a decision on an appeal later on Tuesday or on Wednesday.
"I know the decision of the Court of Appeal in Ontario has immediate effect so we have to move quickly," he said.
The three-person Ontario court ruled that the federal law limiting marriage to heterosexuals violated the 1982 Charter of Rights and Freedoms, part of the Canadian Constitution implemented under former Prime Minister Pierre Trudeau.
After exchanging rings with Stark, a euphoric Leshner appealed to Prime Minister Jean Chretien not to oppose the ruling.
"This is our gift to Canada, Pierre Elliot Trudeau's gift to Canada and hopefully Jean Chretien's gift. Because we are just two ordinary Canadians who love each other. We're not a threat to anyone," Leshner said.
The decision was one of three rulings expected this year by appeals courts in provinces across the country.
A decision in May by a British Columbia appeals court had given the federal government until July 2004 to change its law to include homosexual marriages, and Cauchon had said he was mulling an appeal.
But the Ontario court ruled that to wait for federal action would deny the gay couples their constitutional rights. The court redefined the common law definition of marriage as "the voluntary union for life of two persons to the exclusion of all others."
In so doing, it substituted "two persons" for "one man and one woman."
"The common law definition of marriage is inconsistent with the Charter to the extent that it excludes same-sex couples," the court ruled.
The decision drew an angry response from conservative groups opposed to same-sax marriage.
"The appointed, unaccountable courts should not be permitted to continue their bizarre role of determining public policy," said Real Women of Canada.
Alberta Premier Ralph Klein said he would block any attempt to impose gay marriage in his province, Canada's most conservative, by using the "notwithstanding clause" in the Constitution allowing governments to override court decisions.
"If there is any move to sanctify and legalize same-sex marriages, we will use the notwithstanding clause. Period. End of story," he said.
(Additional reporting by David Ljunggren in Ottawa)
Most telling line:
Agreed. The ability to make babies doesn't factor into it. Once again, most excellent.