Jim and Pam's marriage almost went through a serious hurdle in Jim and Pam were simply good friends, but it was clear they had unspoken romantic feelings for one another. Pam's engagement to another man as well as Jim's transfer to a different Dunder Mifflin branch complicated matters. In time, their relationship evolved, and by series end, the pair were married with two children. However, there was a bit of tension among Jim and Pam in The Office's final season, and the couple may have met another fate — if the series went with the original plan.

In the early episodes of The Office season 9, Jim ed Athlead, a sports marketing business based in Philadelphia that his old college friend created. After initially rejecting an offer to take part in the company that he once helped conceive, Jim secretly went behind Pam's back and invested his time and money into the business. As Jim split his time working in Scranton and Philly, the tension between him and Pam started to grow. The anger and emotions boiled over when Jim got mad at Pam for failing to record their daughter's dance recital. Pam then turned to Brian (Chris Diamantopoulos), the boom mic operator from the documentary crew.

Related: The Office: Jim & Pam's Wedding Originally Had An Insane Roy Twist

The introduction of Brian broke the fourth wall in The Office. It also added more conflict to the Jim and Pam relationship because there was now another man acting as Pam's shoulder to cry on. The married couple later agreed to couples counseling, and in time, they got back on track. Jim quit his job at Athlead and proved that Pam was always enough for him in life. In the series finale, Pam secretly put their house on the market so the family could relocate, allowing Jim to the sports marketing field since it was his dream job. They seemingly lived happily ever after but their journey was almost a lot different according to Andy Greene's recent novel, The Office: The Untold Story of the Greatest Sitcom of the 2000s. The cast and crew revealed that Jim and Pam nearly went through a split before reuniting in the final episode.

There Was Almost A Real Love Triangle Between Pam, Jim, And Mike The Boom Guy

pam and brian – the office

There was always a plan to have Jim and Pam experience a few bumps in the road with their marriage in The Office season 9. Writer Brent Forrester recalled that series creator Greg Daniels wanted to do something risky, adding that "there was going to be a reunion episode where you see that Jim and Pam have split up by this time, and they will have their reunion in the reunion episode." This would have taken place in the series finale, which served as a reunion following the premiere of the documentary. To amplify the tension, the series introduced Brian as someone who had documented Pam's every move for nearly a decade. Another writer, Owen Ellickson, shared that there were talks of having Pam and Brian hook up, but a lot of the crew were against the addition of Brian altogether.

Fans weren't too receptive to Brian's presence and how it affected Jim and Pam's relationship. Krasinski emerged as the voice of reason and convinced the writers to push the couple back together since they were the heart of the show. Daniels and The Office writers pulled the plug on the plan for the split and allowed the couple to get back to their roots. Though it was understandable that a longtime married couple would experience stress, it would have been cheap to break them up only to get them back together shortly thereafter.

Next: The Office's Most Ridiculous Cut Storyline Saw Michael Scott Get Crucified