Brad Pitt, Gwyneth Paltrow, John Mayer and Katy Perry all attended the bash

Jennifer Aniston celebrated her 50th birthday surrounded by her best friends — and a few exes.

The actress’s ex-husband Brad Pitt was spotted heading into the party at Sunset Tower in L.A. on Saturday, making the most headlines out of any of her guests. Aniston and Pitt, 55, were married from 2000 to 2005.

“Basically, every single person who Jen loves attended. That included Brad,” a source told PEOPLE about Pitt’s appearance. “The party was a celebration of Jen’s life.”

The 56th Annual Primetime Emmy Awards - Arrivals
Credit: Chris Polk/FilmMagic

“Brad, for long, was a very important part of Jen’s life. She debated back and forth with friends if she should invite him,” added the insider. “She was very happy that he showed up. Many of his close friends were at the party too.”

US actor Brad Pitt (R) and his wife, actress Jenni
Jennifer Aniston and Brad Pitt in 2002

Another ex in the crowd was John Mayer, 41, whom Aniston dated on and off from February 2008 to March 2009. The two went through a highly publicized split but have stayed friends. Aniston reflected back on their breakup shortly after they called it off the first time.

“We care about each other. It’s funny when you hit a place in a relationship and you both realize, we maybe need to do something else, but you still really, really love each other. It’s painful,” she told Vogue. “There was no malicious intent. I deeply, deeply care about him; we talk, we adore one another. And that’s where it is.”

The two briefly reunited and attended the 2009 Oscars together before making their split official the next month.

John Mayer and Jennifer Aniston
| Credit: Kevin Mazur/VF/WireImage for Vanity Fair

But Aniston wasn’t Mayer’s only ex at the party. Also in attendance was singer Katy Perry, 34, whom Mayer dated on-and-off for three years until calling it quits in 2015. Perry hit the party with boyfriend Orlando Bloom, 42, at her side.

Like Mayer, Pitt ran into more than one ex at the party. The Oscar-winning producer also saw former flame Gwyneth Paltrow; the two dated in the mid-’90s and were even engaged before splitting in 1997.

Pitt started dating Aniston the year after breaking it off with Paltrow, 46.

Gwyneth Paltrow and Brad Pitt
| Credit: Marion Curtis/DMI/The LIFE Picture Collection/Getty

Rounding out the guest list was Aniston’s BFF and Friends costar Courteney Cox, 54, who remains close with ex-husband David Arquette, 47. (The two share 14-year-old daughter Coco.)

Other attendees included Reese Witherspoon, George Clooney and Amal Clooney, Lisa Kudrow, Robert Downey Jr., Laura Dern, Kate Hudson and Demi Moore.