Although Cox, 51, was not among the unsuspecting guests photographed arriving at the couple's Bel Air mansion on Wednesday, PEOPLE can confirmed that not only did she serve as Aniston's maid of honor – she also closed out the night with the bride and groom!
"The last guest to leave was Courteney," says an observer. "She left right after Ellen DeGeneres and Jimmy Kimmel. She left around 3 a.m. At 2 a.m. they still had the music pretty loud."
Of course, Cox and Aniston have shared a long and close friendship, beginning in 1994 with their costarring roles on NBC's Friends – the decade-long smash series that bonded them for life.
Last July, Cox attended a dinner hosted by Details in Theroux's honor, where the actress called her friend's fiancé "so handsome and cool."
In 2013, Cox joined Aniston and Theroux on one of their many sizzling trips to Los Cabos, Mexico.
And after Cox's engagement last July, she celebrated with a "girls' dinner" joined by Aniston and their fellow Friends friend, Lisa Kudrow, who also attended Aniston's wedding.
Aniston is godmother to Cox's 11-year-old daughter, Coco, and in the February 2014 issue of More, Aniston spoke about her deep respect and affection for Cox.
"There's absolutely no judgment in Court," she said. "You'll never feel scolded. She's extremely fair, ridiculously loyal and fiercely loving."
She added, "I've slept in her guest bedroom a lot. Without giving away too much of my private stuff, all I can say is she's been there for me through thick and thin."