When the writers of The Office wanted the characters Jim Halpert and Pam Beesly to break up in season 9, John Krasinski stepped in to save them, according to Fox News.
Author Andy Greene revealed in his book The Office: The Untold Story of the Greatest Sitcom of the 2000s that the show's creator Greg Daniels wanted to break up Halpert and Beesly with a cheating scandal, according to Collider.
The characters' relationship was revealed in season 4. One of the show's writers Owen Ellickson shared the alternate ending in the book.
Halpert and Beesly's relationship was under strain when he took a job in Philadelphia in season 9, while Beesly took comfort from a new character Brian.