John Krasinski Kept This Major Plot Twist From Happening On The Office

We may receive a commission on purchases made from links.

In its nine-season run, "The Office" earned raves from millions of viewers, five Emmy Awards, and a place in television history. The workplace sitcom struck a chord because of its relatable setting and memorable characters, whose personalities became more interesting and complex over time. One of the most beloved storylines, of course, was the relationship between salesman Jim Halpert (John Krasinski) and receptionist Pam Beesly (Jenna Fischer). In the first season, Jim had a quiet crush on Pam, who was engaged to Roy. By the show's finale, the couple had been married for several years and were parents to two young children, per The Hollywood Reporter.

Brian Baumgartner, who played Kevin on the show, has released a book, "Welcome to Dunder Mifflin: The Ultimate Oral History of The Office." As Baumgartner explains in his introduction, he was curious to know exactly what has made the show stay so beloved more than 10 years after it went off the air. "How did we get here? What did 'The Office' do right?" he writes. "Could we find the clues, retrace our steps, and figure out how we stumbled onto a formula that resonates stronger today than it ever did?" 

Baumgartner interviewed the show's cast, crew, producers, and writers to get some answers. And it turns out, there might have been one surprising plot development if a cast member hadn't stepped in to stop it. 

The Office's writers wanted Jim to cheat on Pam

"The Office" had its constants: Michael Scott's inappropriate jokes, Dwight Schrute's passion for his beet farm, and the love between Pam and Jim (or "PB&J," as they were nicknamed). But in the eighth season, the show's writers wanted to shake up the Halperts' marriage. Pam was on maternity leave after the birth of their second child, and temp receptionist Cathy was working in her place. 

In the episode "After Hours," Jim, Cathy, and other coworkers go on a business trip in Florida, and Cathy sends romantic signals to Jim in his hotel room. As John Krasinski told his castmate Brian Baumgartner, the script originally called for Jim to give in and kiss her. Krasinski felt that audiences would be permanently turned off if Jim cheated on the love of his life. "That's the only time I remember putting my foot down ... I remember saying things that I never thought I'd say before, like 'I'm not going to shoot it,'" Krasinski recalled in the book (via eTalk).

Instead, Krasinski and show creator Greg Daniels agreed to a compromise: Jim and Pam would come close to separating under the strain of parenthood and Jim's work ambitions but would eventually patch things up. In the finale, Pam reveals to Jim that she's selling their Scranton house so Jim can take a job opportunity in Texas. By the closing credits, viewers were assured that Jim and Pam would live happily ever after.