The two appeared in an iconic Pepsi commercial together back in 2003.
"Happy Birthday Britney Spears," Beyonce wrote alongside the black-and-white photo.
The 39-year-old "XO" singer and Britney go way back. In 2003, they appeared in an iconic Pepsi commercial, which also starred Pink and Enrique Iglesias. Beyonce, Britney, and Pink all played female gladiators who defied Enrique's command for them to battle and instead belted out Queen's "We Will Rock You."
Britney recently celebrated her birthday with a Hawaiian getaway trip with boyfriend Sam Asghari.
A source previously told ET, "She was thrilled to get away to Hawaii and have a romantic trip with Sam. It was an early birthday present to herself. Britney hopes to see her [sons] on her birthday. ...She is excited about turning 39, and she thinks this year will be a healing year for her."