Prince had a special place in his heart for Toronto, a city the music legend once called home.

The superstar singer-songwriter known for his incredible musicianship and a cavalcade of award-winning hits, died Thursday at the age of 57, according to a publicist.

He was in Toronto a month ago to play a pair of shows.

A 'cosmopolitan' for Prince

"I love Toronto," he told The Canadian Press over a decade ago.

Praising the city as "cosmopolitan," he talked about the variety of people that live within Toronto and its nightlife — including its music scene and its restaurants.

"It's a real melting pot in every sense of the word," he said.

The back cover of Prince's album Musicology includes this photo of the artist in front of some iconic Toronto buildings. (Prince)

In the early and mid-2000s, he was married to a Torontonian, Manuela Testolini. It was a pairing that led to Prince spending time in the city.

It was during this period that Prince recorded the album Musicology. Media reports from that time indicated the recording work was done in Toronto. The jacket of the CD only lists recording work at Mississauga's Metalworks Studios, as well as additional work in Minnesota, his home state, and New York.

Prince was spotted attending a Raptors game back in January of 2002, a time period in which he was married to a woman from Toronto, Manuela Testolini, and reported to be spending some of his time in the city. (Frank Gunn/Canadian Press)

Over the years, Prince was spotted at Raptors games, or even reportedly taking to a stage on occasion — including as a DJ.

When Prince played a show at the old Warehouse back in 1997, long lines of fans waited to see him play.

John Northcott reports on Prince's performance at the 'Warehouse' 1:01

At Massey Hall in November 2014, frenzied fans in Toronto lined up for hours in the rain for a chance to see the veteran musician, after an unconfirmed rumour the Purple One was playing a show there. It turned out not to be true.

An icon remembered

Recently, Prince had been travelling as part of his solo Piano and a Microphone tour, which included gigs in Toronto and Montreal in late March.

Torontonians shared memories of watching the music icon perform live:

<a href="https://twitter.com/CBCToronto">@CBCToronto</a> Saw him in 2004 at the ACC. I don’t dance. Ever. I danced my ass off that night.Still have some purple streamers somewhere —@aronharris

<a href="https://twitter.com/CBCToronto">@CBCToronto</a> I feel so grateful I saw him last year at <a href="https://twitter.com/SonyCentreTO">@SonyCentreTO</a>. —@DavidAGaspar

Loved seeing Prince in concert in Vancouver & working with his team here in Toronto. Such an icon & true talent. <a href="https://t.co/WvAjYJ0qIt">pic.twitter.com/WvAjYJ0qIt</a> —@Tyler_Mills

Passing where he performed his Piano+Mike concert March 25. Just started 2 rain. There be doves' tears... <a href="https://twitter.com/hashtag/RIPPrince?src=hash">#RIPPrince</a> <a href="https://t.co/ineeflAlZL">pic.twitter.com/ineeflAlZL</a> —@WingTsunToronto

I'm gutted. I saw Prince on the Purple Rain tour 2 nights in a row in Toronto. It was such a night...wow. He was the real deal —@Juliana_Stone

Here's <a href="https://twitter.com/prince">@prince</a> in Toronto on Good Friday, 2016. <a href="https://twitter.com/hashtag/RIPPrince?src=hash">#RIPPrince</a> <a href="https://twitter.com/hashtag/TOmusic?src=hash">#TOmusic</a> <a href="https://t.co/FDzjOpvlRI">pic.twitter.com/FDzjOpvlRI</a> —@shelleycarroll

Toronto singer The Weeknd, who has often cited Prince as an artist that inspired and influenced him, posted a series of tweets about the loss of the superstar. He also shared a photo of the moment Prince presented him with an American Music Award.

i can't believe what's happening right now. i just woke up but it feels like I'm dreaming. we live in a world where Prince passes away??? —@theweeknd

i promise this was the greatest moment of my entire life. i wish i could relive it everyday. <a href="https://t.co/i7oax7tLYr">pic.twitter.com/i7oax7tLYr</a> —@theweeknd

there's no one left... —@theweeknd

Prince's twitter account tweeted a message using a very fitting hashtag #Torontolovesprince when the superstar was in town to play one of his last shows ever.