Britney Spears is taking the phrase : “the enemy of my enemy is my friend” to heart.

Britney Spears is throwing her support behind Janet Jackson.

The “Toxic” songstress, 42, posted — and quickly deleted — a sweet message about the “Scream” hitmaker, 57.

“Thank you to this beautiful lady for keeping my dreams and heart alive,” Spears wrote on Instagram Sunday.

“She’s always been the deepest and brightest woman at the same time. She went through so much but I feel she is someone I will look up to for the rest of my life,” the “Circus” singer went on.

“Thank you for your music and your divine way of untangling intelligence to a far more clear view than anyone could ever imagine.”

Spears penned a sweet tribute to Janet Jackson in a since-deleted post.Ouzounova / SplashNews.com

“She’s always been the deepest and brightest woman at the same time,” she wrote of Jackson.Janet Jackson / Instagram

The sweet caption, which was accompanied by a photo of Jackson’s cover art for her 1993 album, “Janet,” seemed to reference the controversy surrounding her Super Bowl XXXVIII performance with Justin Timberlake.

Spears’ message comes amid her ongoing feud with her ex-boyfriend, who infamously exposed the five-time Grammy winner’s chest in the middle of the 2004 Halftime Show.

While Jackson and Timberlake, 43, both issued public apologies at the time, the “Sexyback” chart-topper’s career remained largely unscathed amid the fallout.

It seemingly referenced Jackson’s 2004 Super Bowl mishap with Justin Timberlake.REUTERS

Spears also has a checkered history with Timberlake, whom she dated in the early 2000s.Getty Images

The tide has turned in recent years, however, and Timberlake fell out of favor in the court of public opinion during the Free Britney movement.

Most recently, Spears revealed in her memoir, “The Woman in Me,” that she had an abortion while dating Timberlake in the early 2000s because he “wasn’t happy” about the pregnancy and “didn’t want to be a father.”

She later extended an olive branch to the *NSYNC alum in a since-deleted Instagram post.

“I also wanted to say I am in love with Justin Timberlake’s new song ‘Selfish’ It is soo good,” she wrote on social media.

The “Toxic” singer recently revealed she had an abortion because her then-boyfriend wasn’t ready to be a father.Getty ImagesWhat do you think? Post a comment.

Bizarrely, the “Friends with Benefits” actor responded by taking the stage and emphatically telling the crowd, “I’d like to take this opportunity to apologize to absolutely f–king nobody,” before launching into his 2002 song “Cry Me a River,” which was inspired by his relationship and breakup with Spears.

The “Gimme More” songstress shot back at her former flame on social media, writing, “Someone told me someone was talking s–t about me on the streets !!!”

She continued, “Do you want to bring it to the court or will you go home crying to your mom like you did last time ??? I’m not sorry !!!”