Pranksters. Best friends. Soulmates. The Office's (2005-2013) Jim Halpert (John Krasinski) and Pam Beesly (Jenna Fischer) are one of TV's most beloved and memorable couples. Throughout nine seasons, viewers watched the Dunder-Mifflin employees fall in love, get married, have babies and build a life together.

Like all relationships, Jim and Pam's isn't always a fairytale, and just because this twosome is destined to be together, doesn't mean they have some ups and downs. Here are the five worst things Jim does to Pam, and five times Pam proves their relationship is less than perfect.

RELATED: The Office: 10 Season 1 Jokes Everyone Completely Missed

Pam: Breaks Jim's Heart

Jim and Pam kissing in The Office

Even though Pam is engaged to her high school sweetheart, Roy (David Denman), it's Jim who is her best friend, confidant and partner in crime when it comes to workplace hijinks.

With Pam's wedding day looming, Jim finds the nerve to confess his true feelings for Pam during casino night on the season 2 finale. Pam apologizes for misleading Jim, insisting she only cares for him as a friend. The two wind up kissing, but Pam insists she's going to marry Roy. Jim is so devastated by the rejection, he transfers to a branch in another state. Jim's heartfelt declaration is what fans have been waiting for, and it takes him so long to work up the nerve fans desperately want Pam to wake up and break up with Roy.

Jim: Gives Pam The Cold Shoulder

Jim and Karen sitting together in The Office.

Jim returns to Scranton after a merger, and Pam can't wait to see her friend, but after months apart things just aren't the same. Not only is Jim not keen on a possible romance (he's dating co-worker Karen), Jim isn't interested in rekindling their friendship either, making things awkward between the former besties.

It's tough to watch Pam have Jim's new relationship thrown in her face every day, especially since Karen (Rashida Jones) is a pretty cool chick. It's hard to reconcile this new kind-of-a-jerk Jim with the one who used to be a permanent fixture at Pam's desk. Pam is even lonelier with Jim back in the office than she was while he was gone.

Pam: Tells Roy She Kissed Jim

Pam gets back together with Roy, but she's determined they have a better relationship the second time around. This means complete honesty, so Pam admits to Roy she kissed Jim. Her motive is suspect since she could have told Roy when she called off their engagement. Instead, she waits until Jim is back and with Karen. Pam also knows Roy well enough to predict he won't take the news well.

Pam should give Jim a heads up after she tells Roy, but he gets blindsided by Pam's enraged ex-fiance who attacks Jim at the office. If it wasn't for Dwight (Rainn Wilson) and his handy can of pepper spray, Roy may have reduced Jim to a stain on the carpet. Not cool, Pam.

RELATED: The Office: The Best Episode From Each Season, Ranked

Jim: Tries To Set Pam Up With Andy

When Andy Bernard (Ed Helms) comes to Jim looking for advice on who to hook up with in the office, Jim suggests Pam. Yes, it's a practical joke, and Pam seems more tickled to be receiving any attention from Jim than annoyed by the prank. But things aren't entirely okay between them, so feeding Andy false information about Pam's turn-ons (Frisbee golf, falsetto singing, banjo playing) is weird and a bit mean-spirited, particularly when it comes to Andy who isn't in on the joke. Plus, Pam is stuck fending off Andy's advances although viewers never get to see how she eventually makes it clear she's not interested.

Pam: Confronts Jim In Front Of The Entire Office

Pam gives a speech in front of everyone at Beach Games on The Office

After months of awkwardness, Pam decides to confront Jim about their complicated relationship status. Instead of doing it in private, she does so in front of the entire office, including Jim's girlfriend. Shippers are thrilled Pam finally speaks up, admitting she misses Jim, and he's the main reason she called off her wedding to Roy, but it's kind of a b**chy thing to say with Karen sitting right there. She also puts Jim on the spot by calling him out. This is an A and B conversation, and Pam needed to C about having it in private.

Jim: Doesn't Propose To Pam

Jim proposes to Pam The Office

Jim's been holding onto an engagement ring for Pam since they started dating, but he doesn't know how to pop the question until Toby's (Paul Lieberstein) going away party. What better place than the office and what better time now that they're on the same page? But Andy seizes the opportunity himself to propose to Angela (Angela Kinsey), forcing Jim to put the ring back in his pocket.

Pam suspects something is up, and she can't help but get excited about the prospect of Jim finally asking her to marry him after a few joke proposals. Jim's preoccupation with perfect timing turns the night into a disaster. Pam is so letdown she can barely hold back the tears.

RELATED: The Office: 10 Weirdest Creed Moments That Go Ignored

Pam: Gets Close To A Member Of The Documentary Crew

pam and brian – the office

As Jim and Pam's marriage becomes increasingly strained, Pam leans on Brian (Chris Diamantopulos), a sound guy and part of the crew filming the documentary. Brian tells Pam he doesn't want to insert himself where he doesn't belong, presumably between her and Jim, but he's ready and willing to be there for her if she needs him.

Nothing ever happens between Brian and Pam, and she doesn't even appear to comprehend Brian may have feelings for her that extend beyond friendship. But Pam shouldn't be crying on the shoulder of another man. Jim is never the wiser as far as viewers know, but he might have an issue with the depth of his wife's connection with Brian if he did.

Jim: Lets It Slip Pam Is Pregnant

The Office Jim Pam Niagara Falls

It's the worst kept secret that Pam is preggers as she and Jim prepare to tie the knot with one exception -- Pam's super judgy and conservative grandmother. Despite Jim and Pam's warning to everyone in the office to keep their mouths shut, viewers know somebody is going slip up.

But it's not one of the obvious suspects (Michael) who manages to simultaneously embarrass Pam and break the news to her grandmother. Jim turns out to be the weak link. This makes for an incredibly awkward toast and one cranky old lady who threatens to boycott the wedding until Michael (Steve Carell) saves the day.

Pam: Refuses To Move To Philadelphia

Jim talking to Pam at the Athlead Offices

When Pam wants to go to art school in New York City, Jim supports her wholeheartedly, even though it means they'll have a long-distance relationship. He's behind her when she quits her job as a receptionist to work as a salesperson for Michael. Jim has Pam's back all the time, but when he wants to follow his dream to Philadelphia, Pam puts her foot down, refusing to leave Scranton.

Granted, if Jim was more honest from the start about how much changing careers means to him, Pam might be more willing to yield. Yet, she seems very content with the status quo while Jim longs for a shot to make his family's life better. The pressure of splitting his time between his new job and the old one takes a toll on Jim who resents Pam's lack of support. Once again, Jim makes a huge sacrifice to save his marriage (Pam does come through big time in the end).

Jim: Lies To Pam

When Jim gets the chance to become a partner in a new sports marketing company, he and Pam decide the timing isn't right. But it's Jim's dream job, so he goes behind Pam's back and commits himself to the new business venture.

Pam knows something is up and gives her husband plenty of opportunities to admit whatever it is he's hiding. Jim makes this potentially life-altering decision for their family against her wishes and is super shady when it comes to telling her which only makes his deception even worse. Jim eventually comes clean, but the damage is done, and Pam is truly shocked and hurt by Jim's actions.

NEXT: 10 Most Important Moments On The Office