LOS ANGELES (Reuters) - The doors of Dunder Mifflin's Scranton branch closed for the last time on Thursday as NBC's "The Office" wrapped up after a nine-season run with a nostalgic finale featuring a long-awaited wedding and the return of the show's biggest star, Steve Carell.
Emmy-winning mockumentary "The Office," adapted from Ricky Gervais' British series of the same name, saw a documentary crew filming the daily lives of employees at the Dunder Mifflin paper company, led for several years by hapless boss Michael Scott, played by Carell.
On Thursday's 75-minute finale, set six months after the fictional documentary was released, the colleagues all reunite for the marriage of Machiavellian office manager Dwight Schrute (Rainn Wilson), and accountant Angela Martin (Angela Kingsley).
Carell entered the episode as a surprise guest at the wedding, uttering one of Michael Scott's best-known phrases - "That's what she said."
Later as he considered the romances that had formed at the workplace, Carell's character told the camera, "It's like all my children grew up and they married each other."
Over nine seasons, audiences have been treated to numerous office fights, friendships and romances on the NBC sitcom. One of the most compelling storylines was the growing romance of Jim and Pam, played by John Krasinski and Jenna Fischer, as audiences watched them transition from friendship to marriage and parenthood.
For fans of the show, the season finale saw most of the long-standing cast members get their happy ending.
Stanley finally retires, Erin finds her birth parents, Andy capitalizes on becoming an unwilling viral video star, Kelly and Ryan run off into the sunset (albeit abandoning a baby in the process) and Jim and Pam decide to move to Austin, Texas.
The final scenes featured a montage of key moments, including Jim and Pam's romance and the numerous friendships that developed over the years.
"I wish there was a way to know you were in the good old days before you've actually left them," Andy Bernard, played by Ed Helms, said wistfully.
The cast also reflected on the documentary that captured nine years of their lives at the company, which Jim described as "this stupid, wonderful, boring, amazing job."
"Imagine going back and watching a tape of your life. You can see yourself change ... watch yourself fall in love, become a husband, a father. You guys gave that to me," Jim said to the cameras.
LAUNCHING STARS, FALLING AUDIENCES
"The Office," which first aired in 2005, began with a relatively unknown cast, led by Carell, whose breakout film "The 40-Year-Old Virgin" came out the same year.
The show made stars of many of its cast members, leading to high-profile movie roles, and its producers said last year that the outside success of "The Office" actors played a role in the decision to wind it down.
Carell left the show in season seven to focus on his rising film career, which has included roles in "Crazy, Stupid, Love" and "The Incredible Burt Wonderstone."
Helms also made the move to the big screen with roles in "The Hangover" franchise, and Krasinski starred in the recent film "The Promised Land" with Matt Damon.
Mindy Kaling, who plays office mean girl Kelly Kapoor, landed her own Fox sitcom "The Mindy Project," while Craig Robinson, who plays warehouse manager Darryl, scored film roles in "Pineapple Express" and upcoming "This Is the End."
After Carell's exit in 2011, audiences began to turn away from "The Office" and viewership fell to about 4 million last year per episode from a high of about 8 million in 2008.
The show's culmination comes on the heels of another NBC comedy, "30 Rock," bowing out after seven seasons in February.
Prior to the finale, an hourlong retrospective of the show featured cast members and producers talking about the impact of "The Office" on their careers and why fans were drawn to it.
"This is a perfect time for the show to come to a close," Wilson said. "There's a finality to it and a sadness to it."
Wilson had sought to create a spin-off show led by his character Dwight, but it was not picked up for broadcast.
The unlikely star of the show has been the city of Scranton, Pennsylvania, which prior to the show was known for coal mining but not anymore.
As the series drew to a close, tens of thousands of people gathered in Scranton earlier this month to give a rousing send-off to the sitcom that changed the image of the city forever.
"Thank you, Scranton," Carell told the crowd. "This all is because of you."
NBC is a unit of Comcast Corp.
(Reporting By Piya Sinha-Roy; Editing by Bill Trott)