Best girlfriend ever?!
The actor's mother, author Sonia Copeland Bloom, was also there to help him celebrate.
"Best gift ever surprise visit from me mum 🎈," Orlando captioned a photo of himelf getting hugged by his mama.
Katy, 32, shared a video on her Instagram story that showed friends singing to the birthday boy as he blew out the candles on his enormous "Happy Birthday Lando" birthday cake that was topped with a giant white owl.
Photos from the bash popped up on fan Twitter accounts including one called orlandobloom_orli with the handle @kaihuajuanjuan. It shared a photo collage that included a shot of the birthday boy and his friends wearing onesies covered in Orlando faces.
Justin's wife Jennifer Aniston was also at the party, which Us Weekly reports was held at the Colony Palms Hotel and planned by event maven Mindy Weiss. A photo of Jennifer flipping a bird to the camera appeared online before seemingly being deleted.
Orlando's pal Amanda de Cadenet took to Instagram to post a selfie of the glorious b-day garment that guests receieved, captioning the shot, "Partying in my @orlandobloom Birthday Suit .. #Happy 40th my sweet friend 🎂💕Such a treat to celebrate your life."
Katy can be seen in other dark images that have popped up online sporting a new blonde hair color and a white beret at the bash.
The next day, the "Firework" singer — who's been dating the British actor since January 2016 — publicly debuted her new hair hue while posing with artist Sham Ibrahim in Palm Springs.
Despite breakup reports in November, Katy and Orlando proved they were still going strong when photos emerged revealing he'd spent Thanksgiving with her family.
Fueling the rumor mill even more, "Entertainment Tonight" reported that the stars might actually be engaged: The outlet ran photos of Katy wearing an enormous yellow diamond ring on that finger while out with Orlando in New York City on Nov. 28.
However, the ring was gone when Katy accepted the humanitarian award from Hillary Clinton at UNICEF's annual Snowflake Ball the next night.