"In the way you need the right partner to have a great marriage, I needed the right costar to have this relationship," the actress explains

It was love at first audition for Jenna Fischer and John Krasinski.

Fischer, who plays Pam to Krasinski’s Jim on The Office, isn’t sure their characters would have become the fan-favorites they are if he hadn’t been chosen to play her husband.

Get push notifications with news, features and more.

“I was paired up with John often and I thought this was good because he was my favorite Jim,” Fischer explains of the final round of eight actors – four Pams and four Jims – on Thursday’s episode of The Jeff Probst Show.

“On the second day, John whispered to me, ‘You’re my favorite Pam. I hope you get it.’ ”

Image zoom Jason LaVeris/Filmmagic

Needless to say, when the actress heard the news about her newly-casted costar, she was overjoyed.

“When they called me and said I got the role, I said, ‘Who’s Jim – did you cast John Krasinski?’ ” Fischer, 38, says. “They said, ‘Yes’ and I started crying because I knew it would be good. And I mean this honestly – I can’t do Pam without him. In the way you need the right partner to have a great marriage, I needed the right costar to have this relationship.

RELATED VIDEO: Jenna Fischer Admits She Hasn’t Seen ‘A Quiet Place’ Because She Doesn’t Want to See Pal John Krasinski ‘In Peril’

Getting the role that skyrocketed Fischer’s career may indirectly be thanks to Alyson Hannigan, who – for once – didn’t try out for the same part.

“I had been knocking around Los Angeles for years going to various auditions. I would do eight auditions for a new television show and then at the very end they would offer the role to Alyson Hannigan,” the actress admits.

“She was my biggest competition I would get to the final audition and I’d go, ‘I know I’ve got this one.’ And then she’d walk in the door and I’d go, ‘Nope.’ ”

Now that it’s the beginning of the end for The Office – Thursday’s episode will reveal the secrets behind the documentary crew filming at Dunder Mifflin all these years – can Fischer share any behind-the-scenes scoop?