Image copyright Invision/AP Image caption Gord Downie is known for his flashy outfits as well as deep lyrics

A Canadian band whose lead singer was diagnosed with terminal brain cancer have performed at the end of an emotional farewell tour.

The Tragically Hip drew a sell-out crowd to the show in Kingston, Ontario, on Saturday, broadcast live across Canada.

PM Justin Trudeau, who was at the live show, said the band had "been writing Canada's soundtrack for over 30 years".

Lead singer Gord Downie, 52, announced his illness in May.

The news caused shock across Canada.

Canada is closed - for The Hip

The Canadian Broadcasting Corporation called Mr Downie the country's "unofficial poet laureate".

Media playback is unsupported on your device Media caption "Soundtrack of our lives": Justin Trudeau speaks to the Kingston-Whig Standard's Steph Crosier

The Globe and Mail newspaper reported that the 15-stop Man Machine Poem tour "left a trail of heartbreak but also celebration across the nation".

Mr Trudeau tweeted after the concert that the band would be "forever in our hearts and playlists".

He also tweeted a picture of himself writing on a wall of messages to what he dubbed "Canada's band".

Who are The Tragically Hip?

Image copyright Invision/AP

Formed in the 1980s, the blues and rock band penned lyrics which explicitly referenced Canadian life, with a small-town charm that won the country over.

They started as a college band working the local circuit and then took off, but their success across 14 albums was mostly confined to within Canada.

Known simply as The Hip to many Canadians, their songs became part of a national identity.

The most Canadian band in the world

Kingston designated Saturday as The Tragically Hip Day in honour of its local heroes.

The Kingston concert was broadcast on Canadian TV and was shown at hundreds of public screenings across the country in bars and outdoor venues.

"There is a Canadianness that runs through them to the point where new citizens should be given a Tragically Hip CD after they take the oath," said Alan Cross, a radio show host and music historian.

The concert, at the Rogers K-Rock Centre, sold out in minutes.

Image copyright The Canadian Press/ AP Image caption Fans who could not get tickets for the final show piled into downtown Kingston to see it broadcast live

Topics to do with the concert trended on Canadian social media on Saturday.

Image copyright @TorontoPolice Image caption Toronto Police were expecting to be happily distracted

Image copyright @alancross

Image copyright @Lauren_Collins