The last time Ariana Grande performed in Manchester, in the harrowing days after the blast that killed 22 people and injured hundreds more at one of her concerts there, her tribute show began with a minute’s silence and the words: “Let’s not be afraid, Manchester.”

She returned to the city in sparkling style on Sunday night, dazzling through a party playlist as she pledged her undying love to a place that has made her its own since the attack on 22 May 2017.

The 26-year-old Floridian, who was made an honorary citizen of Manchester following the tragedy, returned for the first time in two years to headline its biggest ever Pride celebrations.

There was, unsurprisingly, no explicit reference to the terror attack but, shaking with nerves, Grande did speak about her special connection to the city. “I love Manchester so much, thank you so much for having me back,” she said, to cheers.

“I’m so happy to be here with you – it means the world – so thank you for having me. I’m sorry, I’m so nervous, I had so much more to say but I’m like very overwhelmed so thank you. It’s so beautiful, I love you so much.”

Ariana Grande performing at the One Love Manchester benefit concert on 4 June 2017, two weeks after 22 people were killed in a terror attack on her concert at the Manchester Arena. Photograph: Getty Images

Thousands of brightly dressed fans had crammed into Mayfield depot, a former railway station turned rave hotspot, to see Grande perform less than a mile from the Arena.

They danced and gyrated through most of Grande’s super-speedy 30-minute set, which was packed with hits including Thank U Next and 7 Rings. The show ended with an emotional singalong to One Last Time – a song that was re-released as a charity single after the arena bombing.

Figen Murray, the mother of Martyn Hett, one of the 22 killed in the blast, said Grande’s return would “bring about a lot of healing” for the bereaved families. She tweeted: “Love will always win and Ariana Grande is boldly back, sticking two fingers up to hate!!!!”

The choice of Grande to headline Pride divided opinion when it was announced in February. Some complained about a straight artist topping the LGBT event while others were angry at the price of tickets – £71 for a weekend pass, up from £30 last year.

However, festival organisers said the prices were not comparable as this year’s Pride is a full weekend of live shows, featuring artists such as Emile Sande, Years & Years, Bananarama and Cheryl.

Waving a rainbow-coloured flag, Grande told the crowd she was “so happy” to share in the celebrations. “I spent some of the happiest times in my teenage years singing in gay bars in New York City,” she said.

“It’s always been such a special thing for me so thank you so much for accepting and celebrating me and letting me celebrate you guys. This is such a special feeling so thank you so so so much – I’m so happy to share this with you guys.”

Carl Austin-Behan, Manchester’s former lord mayor, said it was important for the city and its LGBT community that Grande headlined Pride.

“I think it’s important that she has come back. Obviously it was an awful time then but to do something for the gay community, it sends a clear message how supportive she is but also how resilient we as a city are as well. As someone who is passionate about the city I think it makes us stronger,” he said.

Paul Fernley, 32, said it was right that Grande set a party atmosphere despite the underlying emotion. “It feels like it’s the right time. She did the gig straight after and now everyone’s celebrating who she is as an artist,” he said.

“There’s a lot of love for what she did afterwards, visiting people and going to hospitals. It’s nice to have her back. But it’s Sunday night at Pride – it’s a celebration concentrating on something else – it’s about Pride.”

Armed police patrolled the fringes of the festival amid extra tight security inside but that did not deter the party atmosphere. “The scale of it and the vibe is off the scale,” said Nathaniel Thornton, 28, wearing a rainbow coloured costume decorated with a hand-crafted Manchester bee at his second Pride.

“After the bombings we came to Manchester the following day when we had the vigils. This year we would’ve come anyway but the fact Ariana is here amplifies it. Kudos to her.”