A new book reveals the cast of The Office surprised Steve Carell with Michael Scott's emotional farewell song. First airing in 2005 on NBC, The Office would eventually become one of the defining sitcoms of an entire generation. The show featured Carell as Michael, the immature and unconventional regional manager of paper company Dunder Mifflin's Scranton branch.

Although The Office continued to reach new levels of popularity with each passing year, Carell decided to depart the show in season 7, much to the disappointment of many viewers. One of Carell's final episodes, "Michael's Last Dundies" features one of the show's more emotional moments as Michael heads into the conference room where the rest of the staff are waiting for him. All of his coworkers, including Jenna Fischer's Pam, Angela Kinsey's Angela, and John Krasinksi's Jim, then proceed to sing "9,986,000 Minutes," a rendition of Rent's "Seasons of Love" with Dunder-Mifflin-themed lyrics, as Michael looks on with tears in his eyes.

Related: The Office: Michael and Holly's Kids Make One Sad Detail Even Worse

In their new book, The Office BFFs: Tales of The Office From Two Best Friends Who Were There (via Mashable), Fischer and Kinsey reveal that the emotional moment was actually a surprise for Carell. While they explain that Carell "knew something was up" during filming for the final episodes, the song was something the rest of the cast had planned and rehearsed in secret. Check out a quote from the book below:

As we did our final episodes with Steve, it was difficult to contain our sadness at losing our friend and our trusted number one. We cried a lot. The worst was the day we filmed his goodbye song. People often ask if Steve knew we were going to sing to him, because the emotion on his face is so genuine. We'd all been given the lyrics and practiced the song in secret. Steve told me that as he was being led into the conference room, he knew something was up. But he did not know we were going to sing, and the whole thing was very moving.

The Office steve carell and will ferrell

Although the show is mostly known for its clever comedy and wacky performances from Carell and the rest of the cast, The Office occasionally featured truly emotional, gut-wrenching moments. Michael had been an integral part of the show for nearly seven full seasons and saying goodbye to the character and to Carell seems like it was just as meaningful and emotional for the cast as it was for audiences, if not more so. This new information in Fischer and Kinsey's book also helps to explain why Carell's reaction to the song feels so genuine – it truly caught him by surprise.

The Office suffered a pretty noticeable dip in quality in the two seasons following Michael's departure but, thankfully, the character did get to return in the series finale to reunite with his former coworkers. While The Office has now been off-air for nearly ten years, the show still clearly resonates with viewers, and behind-the-scenes stories from Fischer, Kinsey, and the other cast members continue to provide reasons to revisit it all these years later. Saying farewell to Michael marked one of The Office's most emotional scenes, and this new information regarding the character's goodbye song only serves to make the moment even more powerful.

More: The Office: Why Rashida Jones' Karen Left After Season 3

Source: The Office BFFs: Tales of The Office From Two Best Friends Who Were There (via Mashable)