Louis Tomlinson performs first solo single on 'The X Factor' days after the death of his mother

Louis Tomlinson put his heart and soul into his performance on U.K.'s The X Factor Saturday night.

Just three days after his mother, Johannah Deakin, died at age 43 from a battle with leukemia, the One Direction star took to the stage as scheduled to perform "Just Hold On," his first solo single featuring Steve Aoki.

WATCH: One Direction Star Louis Tomlinson's Mother Johannah Dead at 43

According to a statement given to ET from Tomlinson's family earlier this week, the performance was a tribute to his mother, whose wish was for him to continue. And that's exactly what the 24-year-old singer did.

Dressed in a colorful graphic T-shirt, skinny jeans and white sneakers, Tomlinson held back tears as he belted out the catchy tune. "What do you do when a chapter ends? Do you close the book and never read it again?" Tomlinson sang. "Where do you go when your story's done? You can be who you were or who you'll become. If it all goes wrong, darling just hold on."

"Oh until it's all been said, it's not over until your dying breath," he continued. "So what do you want them to say when you're gone? That you gave up or that you kept going on?"

WATCH: Zayn Malik Sends Condolences to Former One Direction Bandmate Louis Tomlinson After Death of His Mom

As the song came to an end, Tomlinson kissed his fingers and pointed to the sky, giving a nod to his beloved mama. "This moment broke my heart," a fan on Twitter shared. "You're amazing @Louis_Tomlinson."

"That was harder than I ever imagined," Tomlinson later wrote in a series of tweets. "I want to thank everyone around me and all of the amazing fans out there that made that so special! Feeling so much love around me and my family. Mum would have been so f**king proud ( sorry for swearing mum 😝 ) love you!"

"Also @steveaoki, you have been such a rock and inspiration throughout this," he continued. "Pure talent and a real gent!"

Directioners who were tuning into The X Factor across the globe live-tweeted their thoughts and condolences, writing things like, "We're all so proud of your bravery and courage on stage tonight," "I'm honored to be your fan," and "I'm crying. Your strength is so admirable, Louis. You've made us all extremely proud. Sending you and your family all the love."

Following the performance, judge Simon Cowell also shared a sweet message.

PHOTOS: Louis Tomlinson with his mother

"You know what. I have to say something to you," Cowell explained to Tomlinson, who was holding back tears, on the show. "I've known you now for six years. What you've just done -- and the bravery -- I respect you as an artist, I respect you as a person, and your mum was so proud of you, Louis, and she was so looking forward to tonight. She's watching down on you now, and you've done her proud."

WATCH: Louis Tomlinson Breaks Silence Following Death of Mother by Thanking Fans for Their Support