Britney Spears has praised her ex-boyfriend Justin Timberlake as a ''genius''.

The 38-year-old singer admitted she had been through one of the ''world's biggest break-ups'' when she split from the 'SexyBack' hitmaker in 2002 but she is still a fan of his music and shared a video of herself on Instagram dancing to her former partner's song 'Filthy'.

And among comments from hundreds of delighted fans, the 'Trolls World Tour' star also shared his approval of the clip.

Posting the video to Instagram, Britney wrote: ''This is my version of Snapchat or TikTok or whatever the cool thing you're supposed to do these days !!!!!

''As you can see I'm not really dancing folks... I'm just very bored.

''PS I know we had one of the world's biggest breakups 20 years ago.... but hey the man is a genius!!!!

''Great song JT!!!!! Psssss if you KNOW WHAT'S GOOD!!!!!(sic)''

In response, Justin - who dated Britney for three years - commented with a laughing face and three raising hands emojis.

The 'Toxic' singer's current boyfriend, Sam Asghari, was also a big fan of the video, in which Britney donned a white cropped top and shorts to dance on her balcony.

He wrote: ''Snapchat, Instagram TikTok, Facebook even Myspace was inspired by you (sic)''

Justin - who has five-year-old son Silas with his wife Jessica Biel - is believed to have written his single 'Cry Me a River' in response to his break-up with Britney and previously admitted the track took him just two hours to write.

He revealed in his memoir, 'Hindsight: & All the Things I Can't See in Front of Me': ''I've been scorned. I've been p***ed off.

''I wrote 'Cry Me a River' in two hours. I didn't plan on writing it.''

Meanwhile, Britney has sons Sean, 14, and Jayden, 13, with ex-husband Kevin Federline.