Harry Styles has received thousands of messages on his birthday, but it was a sweet comment from his mother that attracted the most attention.

The singer, who turned 24 on Thursday, was tweeted by his mother Anne Twist.

She wrote: “Happy birthday to the boy who knows my heart from the inside.”

Within the space of a four hours, the post had been liked and shared more than 40,000 times.

Also marking Styles’ birthday was his One Direction co-star Niall Horan, who jokingly referred to him by a nickname.

Horan tweeted: “@Harry_Styles happy birthday Harold. Have a great day pal.”

One Direction hair and make-up artist Lou Teasdale shared a snap of herself with Styles on Instagram and wrote: “Happy birthday boss man best friend xxx.”

Happy birthday boss man best friend xxx ❤️

A post shared by Lou Teasdale (@louteasdale) on

Fans of the boyband star made sure his birthday became a trending topic on Twitter as they flooded the site with posts wishing him a good day.

Styles rose to fame at the age of 16 on The X Factor when he auditioned as a solo singer before being put into the newly-created band One Direction, along with Horan, Zayn Malik, Liam Payne and Louis Tomlinson.

The band is currently on hiatus and Styles has since gone on to enjoy success as a solo artist, with his debut solo single Sign Of The Times topping the charts last year.

He has also carved out a career as an actor, making his big screen debut in Christopher Nolan’s war film Dunkirk.