The Queen and Prince Philip continued their Canadian tour Sunday in Toronto, spending the morning at church before taking in one of the continent's oldest horse races.

The royals received a warm welcome from thousands of spectators at Woodbine racetrack, where the 151st running of the Queen's Plate was held.

Despite the hot weather, the Queen made an appearance on the track, much to the pleasure of both equestrian and royal enthusiasts alike.

It was the Queen's fourth appearance at the race. She previously attended in 1959, 1973 and 1997.

This year, Her Majesty made the winning presentations as Eurico Rosa Silva rode Big Red Mike to the $1-million prize.

Earlier, the Queen and the Duke of Edinburgh arrived at St. James Cathedral in downtown Toronto for a service shortly before 11 a.m. Hundreds of camera-wielding observers lined the streets outside to get a glimpse of the royal couple.

They entered the church to the sounds of "God Save the Queen," which was followed by a rendition of "O Canada." Ontario Premier Dalton McGuinty, his wife and Lt.-Gov. David Onley sat across the aisle from the Queen.

About 700 people who obtained tickets also attended the service, including Finance Minister Jim Flaherty and his wife, Ontario Progressive Conservative MPP Christine Elliott.

After the service, Her Majesty presented a set of silver bells engraved with the words: "The Silver Chain of Friendship 1710-2010." The expression recalls the treaties signed between the English colonies and the Iroquois Confederacy.

The Queen also rededicated St. George's Chapel, a part of the cathedral so named in 1935 for King George V's silver jubilee.

After the service ended around noon, the Queen and Prince Philip delighted the crowd by waving to onlookers, who pressed against barricades to get a closer look and shouted "We love you, Queen Elizabeth." She also accepted bouquets of flowers from several children.

But the Queen's careful security detail seemed to wilt momentarily in the midday heat when a woman broke free and began chatting with the 84-year-old monarch.

Security eventually stepped in to move the woman away, but not before she managed to talk with the Queen for a few moments and hand her something in a black plastic bag.

The royal couple is enduring heat and humidity for the second day in a row. The Queen and Prince Philip spent a whirlwind six hours Saturday in Winnipeg, where temperatures reached 30 C.

By 8:30 a.m. Sunday, Toronto's medical officer of health had issued a heat alert, to be in effect until further notice.

The alert, which says temperatures will reach 31 C in the city before the humidity is factored in, warns residents to seek out air-conditioned places and stay out of the sun.

Environment Canada has also issued a smog advisory for parts of southern and central Ontario, including Toronto. The agency warns that air quality for the affected areas will be poor.

The Queen has had a busy few days since arriving in Halifax last week. She spent Canada Day in Ottawa with about 100,000 flag-waving Canadians on Parliament Hill, met Liberal Leader Michael Ignatieff on Friday and headed to Winnipeg Saturday morning to rededicate a statue of herself and unveil a cornerstone at the Canadian Museum for Human Rights.

The royal couple is scheduled to visit the headquarters of Blackberry-maker Research in Motion in Waterloo, Ont. on Tuesday before they fly to New York to visit Gound Zero and the United Nations headquarters.