Horses. Beats. The Office.

Happy anniversary to the Halperts! Considering how much The Office still seems to be in our everyday life (thanks, Netflix!), it’s hard to believe it’s been 10 years since TV’s cutest couple — Jim Halpert (John Krasinski) and Pam Beesly (Jenna Fischer) — tied the knot in the sweet, hilarious, and musical hourlong episode “Niagara.”

Now, to celebrate the couple’s tin anniversary, the team behind the NBC comedy reminisces about the secret ceremony, the epic dance line, and a horse left on the cutting room floor.

Yes, a horse, that’s what we said. THE BEGINNING Based on Ricky Gervais and Stephen Merchant’s Golden Globe-winning British TV series of the same name, The Office was developed for American audiences by Greg Daniels. He cast Steve Carell in the boss role of Michael Scott and — just as importantly — found the perfect will-they-or-won’t-they duo of Jim and Pam in Krasinski and Fischer.

JENNA FISCHER (PAM BEESLY): I was a big fan of the original series, and the part that got me emotionally was the Tim [Martin Freeman] and Dawn [Lucy Davis] relationship. So I knew going in that we had a good template, and I felt that I had to live up to the original in that way.

GREG DANIELS (EXECUTIVE PRODUCER/WRITER): It was so beautiful in the English show, and in casting it I tried to get some chemistry between Jim and Pam.

FISCHER: During the audition process, there were four of us for each role and they mixed and matched us, and every time I got paired up with John, being Pam was easier. It was just this natural chemistry that flowed between us, and we just locked into those characters together. And so when I was cast and found out that John was cast, I remember thinking, “Oh, thank goodness, I can’t wait to get started with this guy.” I knew I had the right partner.

JOHN KRASINSKI (JIM HALPERT): For me, it was all about how much fun I had from the moment I met Jenna. Our scenes together were always my favorite part of an episode. I just hoped if people had even half as much fun watching as we did making it then maybe we’d be onto something.

MINDY KALING (WRITER/KELLY KAPOOR): At the end of the “Diversity Day,” which was the second episode that aired, there’s the stage direction that Pam falls asleep on his shoulder and Jim smiles, and I remember thinking, “Wow, in the script that’s such a small win for this character who has had a terrible day,” and yet on camera it really read as this huge emotional win for this guy.

FISCHER: Early on, Greg had a rule that we would only go to the Jim and Pam relationship maybe once an episode, that it would be rare that we’d spend a whole episode on their love story. And it just became very important that we really nailed those moments.

DANIELS: As the show got more successful over season 2, you could feel the “shippers,” people who really got into that relationship, and they were online a lot talking about every little detail. You could feel how important it was to so many people.

Image zoom Peggy Sirota for EW

THE PLANNING After five-plus seasons of anticipation, not to mention a jilted fiancé (sorry, not sorry, Roy) and an unexpected pregnancy, the time came for Jim and Pam’s wedding early in season 6, as the show headed to Niagara Falls (and an EW cover).

KALING: I remember being assigned the wedding and thinking, “Wow, this is a doozy.” A lot of episodes will have a funny hook at the beginning, but this one just has a really happy thing. The Office is built on awkward situations, but with the wedding episode, I was like, “There’s nothing inherently funny about two people very much in love getting married.” [Laughs] A few days later, Greg Daniels said he’d love to write it with me.

DANIELS: When you write the beginning and the end of a story, you also want to write the ending of it. This was my craziest year, because I was running The Office with Paul [Lieberstein] and season 2 of Parks and Recreation with Mike [Schur]. So I probably would have written it myself but it was so busy for me, and I always loved Mindy’s writing and thought she’d be a great person to collaborate with.

KALING: It was a pretty fresh slate. When it became an hourlong episode, obviously there has to be so much more incident than a normal episode, so coming up with the different story lines to fill up the hour was pretty fun. I remember Greg and I sitting at a café in Westwood and really spending most of the time talking about Kevin [Brian Baumgartner] losing his shoes because his feet smelled so bad that they were thrown out at the hotel, and then he had to wear tissue boxes on his feet. I think we ended up spending this entire session talking about the details behind how, not even that they were thrown away, but that they had to be destroyed as if they were toxic and could have hurt other people. No one besides us who wrote it and are comedy writers and are immature would think that part of it was so funny.

DANIELS: We wanted it to be like the Office movie. One of the great things about it was seeing the characters outside. Like, you never saw Kevin at home, so you didn’t get to see them doing much of life. It really opened up a lot of fun story pitches for all the different characters. And a wedding is a classic comedy setting; like, all Shakespeare comedies end with a wedding.

KALING: The episode was very ambitious for us. We obviously shot in a different state, but then we had the rehearsal dinner along with the other stuff, so logistically, for a show that is essentially a bottle show in the office, it was one of the biggest episodes that we’ve done.

PAUL FEIG (DIRECTOR): Over the course of the series, I did 19 episodes, including “Dinner Party,” Jim and Pam’s proposal, and Steve Carell’s farewell, so I tended to get some of the bigger, more high-profile episodes. So when the wedding came up, I was given the job, and it really meant a lot to me.

FISCHER: I felt way more pressure with their first kiss and engagement. I felt like the wedding was going to be a celebration.

KRASINSKI: I remember Steve had told us about one of his friends who had actually mimed taking photos with his fingers in the hopes to ensure that the memories would log in his brain forever. When Jenna did that in the show, it was awesome.

DANIELS: Niagara Falls was a classic wedding destination for 100 years that got encrusted with a very commercial feel. It seemed like a metaphor for the episode in a sense that on the surface it’s commercial and crappy, but at the core it’s romantic and beautiful.

FEIG: The original ending was a big controversy.

DANIELS: I was looking through some of the earlier drafts and there’s some very funny things that we changed.

FEIG: All throughout the episode, Roy’s [David Denman] been kind of haunting around and unhappy that they’re getting married, so when they ask if anybody has reason why this couple can’t get married, he rides into the church on a horse to sweep Pam off her feet like a knight in shining armor and declares, “I have an objection.” And she’s like, “What are you doing? No, I want to get married.” She sends him away, so he has to ride his horse back out of the church. But then, in an absolute insane thing, they had this crazy ending where Dwight [Rainn Wilson] gets the horse and rides it into the falls.

DANIELS: I was really committed to the horse for the longest time. [Laughs] It was like Dwight got fascinated with this historical display at the hotel that talked about various animals. It started with a cow had been swept over the falls and survived, and then a couple of people tried to go over the falls in a barrel and were killed, and then some sheep went over the falls and survived. And he came up with this theory that you could survive going over the falls if you were riding a horse, because a horse would have the instinct of how to swim properly. And so he was trying to get people to listen to this theory, and then Roy interrupts the wedding trying to do a big, grand romantic gesture that nobody wants and just abandons the horse and drives home. So Dwight gets on and goes into the river above the falls, but panics and jumps off the horse at the last second, while the horse goes over in the background of the wedding. I remember scouting this tank on the Universal lot and talking about how we’re going to shoot this horse being swept over the waterfall. Then we got to the table read and I was the last defender of the horse. The entire staff and actors were yelling at me: “Don’t ruin Jim and Pam’s wedding with a horse!”

FEIG: We were all like, “This is insane. You can’t send a horse over the falls.” And Greg was like, “No, it would be really funny.” And there was this whole debate that went on in the writers’ room, people are like, “I don’t know, I think this is kind of dark and weird.”

DANIELS: I finally backed down and took the horse out.

FEIG: So it was kind of last-minute and everyone was like, “Well, what do we do then?”

Image zoom NBCU Photo Bank via Getty Images

THE DANCE In desperate need of a new big moment, the writers and producers turned to YouTube, where a video of a wedding party making their way down the aisle to Chris Brown’s “Forever” was going viral. But, in classic Office fashion, the Dundler Mifflin crew decided that they should be the ones involved with this musical surprise.

FEIG: This was right when that viral video came out. It was so popular that we went, “Let’s just re-create that.” It was a real last-minute addition.

KALING: That video was so joyous and fun. That was obviously that couples’ friends and family, and we thought it would be pretty funny and misguided for Michael to equate the co-workers of the office as Jim and Pam’s beloved close family and friends and do the same thing. But then when we were pitching it, it’s so fun to see our cast walk down the aisle that it actually just became where Jim and Pam really liked it too. If they hadn’t done the secret wedding, them coming down and dancing would have been horrible and ruined the moment.

DANIELS: I think often the best emotion in the show was Michael to Pam, like in the business school episode when he buys her artwork. It seemed like a great redeeming thing for Michael to do after blowing these toasts and generally always being trouble to their relationship — even if sometimes, like in “Booze Cruise,” he would give good advice and we’d play him as a help. From the perspective of the audience, that’s Jim and Pam’s family. The secret dynamic of the workplace show is to find them all being various family members in some way, even though they’re not related.

FISCHER: Since I don’t dance, that was a rehearsal that happened without me being there. And these moments happened sometimes on The Office. For example, in the episode where we all sang to Steve the goodbye song, we all rehearsed that without him for a couple of days, and so the first time he heard it was when we sang it to him on camera, so his emotions there were real. That was similar for me with this dance scene. I hadn’t seen it, they’d all been rehearsing it, and then I was very frustrated that I was stuck in the back of the church. I went up to the front to watch it and I was actually crying during the first rehearsal. It’s so sweet and joyous. I think it was a stroke of genius. Sometimes you spend as much, if not more, time with the people you work with than with your family — especially your extended family. Maybe you see your husband or wife or kids, but how often do you see your brothers or sisters or cousins when you’re an adult? But you see that weirdo that works in the cubicle next to you every single day. One of the cool things about the show is that in some of the character’s lowest moments the people in the office come together to prop them up, and then in our most joyous moments are there to celebrate with them.

FEIG: Honestly, that was a really tough shoot. We were in the church on a really tight schedule and I had like half an hour. So we threw that together and it turned out to be one of the most magical things we ever shot on the show. It just had this energy that was so raw, because it was all happening for the first time in the moment. I remember being so happy and in tears while it was going on. That was a real lightning-in-a-bottle moment that will always be one of my absolute favorite things I’ve ever directed.

DANIELS: It had a great feeling on the set. Creed [Bratton] and Ed [Helms] brought their banjos and guitars, and I have a home movie of the cast hanging around in their wedding outfits while Creed and Ed play music. A lot of us had brought our kids, like my daughter was the flower girl, and they were all dancing to Creed and Ed. It had a beautiful feeling, almost like it was a wedding for the cast. We had all been through a lot shooting by that point, a bunch of seasons and lots of late nights, and this was a chance for them to all get dressed up. There was a very beautiful sense of merging fiction and reality.

Image zoom NBC

THE REAL WEDDING As Kaling mentioned, Dwight, Creed, and the rest of the gang dancing down the aisle would have been a nightmare for Jim and Pam if they hadn’t just returned from their secret wedding. With things spinning out control, Jim comforted a crying Pam at the church by cutting his tie in half (“Still have that tie!” says Krasinski), before they run off to the actual falls to get married on a boat, surrounded by strangers and mist.

KALING: From the beginning, what I think was special about the show is that Greg always said, “The story and true romantic things aren’t necessarily the formal presentational things; those can be funny, but most of the time, the truth in romantic relationships is often the thing that the camera catches.” It was Greg’s idea that they secretly get married on the Niagara boat, because the wedding itself was spinning out of control and no longer their private moment. Greg told me to fly out to shoot that and I remember thinking, “Oh, great, upstate New York, this is not going to be the sexiest work trip.” [Laughs]

FISCHER: It just felt very special. When I got to the hotel to check in, the staff had these champagne flutes with hearts carved into the stem, chocolates, and a note congratulating me on my wedding. It was all just very posh and fancy, which was the complete opposite to a regular day of shooting. I mean, we got excited to film in the parking lot.

KALING:Going on the actual boat was so special. It was just me, Jenna, John, Paul, the script supervisor, and the cameraman. I was in my 20s and sitting in a parka, sweatpants, a hat, and sneakers and getting splashed on as I watched Jenna getting doused with water and mist from the actual falls, but I just remember how beautiful she looked.

FISCHER: We didn’t have trailers, so I wore my wedding dress out of the hotel, all the way to the ship, and then I was walking back in a wet wedding dress. It was very guerrilla-style filmmaking.

FEIG: That was very challenging because it’s very wet. [Laughs] It was crazy because we weren’t allowed to take over the boat, we just had to be on there with the public. We went in the morning and shot it and it was completely dry. It worked fine, but we thought we’d take another crack at it in the afternoon. That’s the one we used because suddenly it was soaking wet. It was hard, everything was blowing around. We recorded the sound but we knew we weren’t going to use much. It just felt real and pure.

KRASINSKI: That day was insane! We had to get it all done in a matter of an hour or so. We had to hide the fact that it was us and try not to let people see the actual wedding in case it got spoiled. On top of it all, I had the flu. So one of the most romantic kisses in the show… is actually just me giving her a huge kiss on the cheek because I didn’t want to get her sick.

FEIG: In the editing room is when we decided we were going to intercut the dance and Pam and Jim on the boat getting married. When we started mixing it up, the editor Claire Scanlon and I were just both in tears because it was so affecting and sweet and funny. I’ve always thought that wedding episode deserved every award for all the acting and how great the writing was, but it was no longer cool to nominate The Office.

Image zoom NBC

THE LASTING LOVE A decade after “Niagara” and more than six years after the series concluded, The Office is arguably more popular than ever, due to its place on Netflix (for now) and the cast and creative team going on to make other long-running comedies, horror hits, and more.

DANIELS: The number of 14-year olds who are into the show is insane. To see other people embrace it and feel about it the same way I did is really special.

FISCHER: Thanks to the new digital streaming services, it’s out there for people to see and rewatch. It makes me so happy. It really does deeply resonate with people and is meaningful beyond just being entertaining. I feel honored and love that the show is still out there and making people laugh.

KRASINSKI: To be honest, it’s hard to compute. We all had such a blast and felt that the show was as big as it would ever be when we ended it…. Man, were we wrong! [Laughs] It will always be the greatest honor to have been a part of a show this special.

FISCHER: I’m really proud that we created this healthy version of a relationship and didn’t wait until the last episode to see them get together. There’s no cheating, there’s no crazy weird breakups and makeups. They just gently weather the storm.

DANIELS: The way the show was shot, you were able to think of it like you were spying on real people. It was a little bit of a romantic fairy tale. By design, they were soulmates kept apart by circumstantial obstacles, but you could see they were meant to be with each other.

FISCHER: I feel like everyone in their love story journey has had a moment of unrequited love or yearning for a person, so I think that kind of hooked people early on. But I really have to give credit to John Krasinski’s performance. In our second episode, Jim goes after a big sale and Dwight ends up stealing it from him. But in his final talking head, Jim says it was a pretty good day, and he’s saying that because Pam fell asleep on his shoulder. That look on Jim’s face, every woman out there wanted a man to look like that when they talked about her.

KALING: Their relationship was the best example of what could happen when you go to work every day. Even if it’s a job that you don’t like, you could find the love of your life there.