12/26/2017 09:17 EST | Updated 12/26/2017 09:17 EST

Brent Hawkes, Pastor Who Officiated Canada's First Same-Sex Marriage, Retires

He also officiated Jack Layton's funeral.

TORONTO — The well-known Toronto pastor who officiated Canada's first legally recognized same-sex marriages delivered his final sermon Sunday.

Rev. Brent Hawkes, who is also known for officiating Jack Layton's state funeral in 2011, is retiring after serving as senior pastor at the Metropolitan Community Church of Toronto for more than 40 years.

In 2001, the openly gay pastor married two same-sex couples using a legal loophole: the ancient Christian tradition of publishing the banns of marriage.

Rev. Brent Hawkes rides a in car during Toronto's Pride Parade on June 28, 2015. Hawkes officiated the first same sex marriage in Canada in 2001.

At the time, same-sex couples could not obtain marriage licences from municipal clerks, but the Ontario Marriage Act allowed couples to be granted a licence if their names were published and read out at church for three Sundays in a row.

But when the couples tried to have the marriages registered with the province, it refused.

The couples and the church sued, and the Ontario Court of Appeal eventually recognized their unions in a 2003 ruling that paved the way for same-sex marriage to be legalized across the country.

Hawkes was appointed to the Order of Canada in 2007 for his work advocating for gay rights.

He will be succeeded as senior pastor by Rev. Jeff Rock.

Also on HuffPost: