Andrew Rannells. Photo: Anna Donovan/Getty

On last night’s Girls, Elijah bumps into Hannah on the North Fork of Long Island. The two hug it out, Hannah invites/begs him and his friends to crash Marnie’s forced get-together, and there you have it: Elijah is back in the fold, delivering hilarious zingers like “old-man Ray.” The one person who doesn’t seem to appreciate how great it is to have him around, though, is his nasty boyfriend (Danny Strong) — and, okay, Marnie. We spoke to Andrew Rannells, who plays Elijah (and was Elder Price in The Book of Mormon — pull it together), about his return to the show, Elijah’s terrible relationship, and rehearsing that choreographed dance scene.

Did you guys shoot the whole episode on the North Fork?

We did. We shot the better part of two weeks in the North Fork. And we used the director Jesse Peretz’s house — that was his house that we shot in. It was so beautiful. He and his wife painstakingly restored that home. It was so perfect. And then we came in and just fucked it all up.

Did you really? Did you guys get to have any fun?

We did get to have some fun. It was very long days. But we definitely had some fun. I prefer the North Fork experience to the normal Hamptons experience, I have to say. Because the North Fork is a little more busted, in the best possible way.

That’s not how Elijah felt. He was like, “Why am I not in the Hamptons?”

Right. But I, Andrew Rannells, prefer the North Fork.

Oh, you’re not Elijah in real life?

I’m not Elijah; I prefer no J.Crew at the beach.

We see Elijah at a new place in his life, but it’s not the best place. How would you describe his current state?

I’m very happy that he’s trying to make up with Hannah and Marnie, but it was really hard to shoot those scenes with Danny Strong because it’s so painful to be in that relationship that is a disaster and that you know is compromising yourself and where you would like to be versus where you are. So that was tough — that’s a tough place for Elijah to land, initially. That said, Danny Strong could not have been a better, more hilarious onscreen boyfriend. But that relationship Elijah’s having right now is a little tough. I’ve certainly been there and I think a lot of people have done that, where you think that it’s your fault or that you should be better for the other person.

Let’s talk about the choreographed dance. You don’t dance yourself, but you were there to see it happen. What was that like?

The choreographer [Celia Rowlson-Hall] actually choreographed a full dance and it required several days of rehearsal. We rehearsed at Silver Cup, we rented a studio and rehearsed — we did a full dance rehearsal. Several. For me and for Chris Wood and Tim Reid, who played the choreographer, we were all Broadway dance folk, so it didn’t really feel too crazy. But it was so much fun being in dance rehearsals with all those girls. [Laughs.] It was very, very strange.

Why strange?

Just because here we are, essentially taking a dance class together. It was cut together in such a way that you really didn’t get to see the full scope of what we learned. But I guess that’s television. I’d never done anything like that on television; I’ve done a lot of that on Broadway. But I’d never rehearsed something like that and then, to see how it’s cut, it’s like, Oh, we really didn’t get to see very much of that hard work.

What was it like for the Broadway vets to rehearse with mere mortal dancers?

Oh, please. It was so much fun, and if you can ever take a dance class with Allison Williams and Lena Dunham, I highly suggest that. They’re so funny.

Did Lena rehearse in a bathing suit?

She did not. I, however, ruined a pair of J.Crew trousers. Because I was like, Whatever — how hard are we dancing? And then I just ripped the crotch out of a pair of pants, and I had to get back on the subway with them. Which was very depressing. I’m for sure going to be arrested for some sort of indecent exposure.

Were you Lena’s inspiration for these Broadway story lines? Elijah’s boyfriend does Broadway PR; Adam is auditioning for a Broadway play …

I don’t think so. We’re in New York. And Adam Driver’s character is pursuing a career in acting, and that sort of lends itself to the theater conversation. But certainly that’s something that I can speak about for some time. [Laughs.] We have an episode coming up and Richard Shepard, the director, said, “Can you give Adam some advice about what it’s like to be on Broadway?” Elijah’s version of advice. Which was very fun. I based the entire conversation on a conversation I once had with Gina Gershon, who I don’t know at all. But she came to see The Book of Mormon, and she told Josh Gad and I what bars to go to. Which I thought was really amazing. Her advice was where to go after the show.

Elijah and his friend joke that Marnie and Ray are sleeping together. Is that going to blow up? Will Elijah be involved in it?

Elijah’s not directly involved in that, but obviously that’s a big story point and such great material for Allison and Alex [Karpovsky] to play with. Because it is something that, occasionally, in friend circles … shit like that happens. It certainly happened in my group of friends, where all of a sudden two people are having sex and you’re like, Wait, what? What are you doing?

You refer to Ray as “old-man Ray.” Was that you? Did you come up with that?

That was me. It just seemed like a douche-y thing for Elijah to say: old-man Ray. I didn’t know what was happening in the episodes before I arrived. So all of the Marnie and Ray situation was new information for me. And I had to ask Allison and Lena and Jenni Konner, “Catch me up on what’s happening?” Not that it was important for Elijah to know. I was just curious. And it was given to me in these sort of bullet points: “Well, Marnie’s fucking Ray …” [Laughs.]

When did Lena and Jenni invite you back to the show?

I was supposed to do one episode, the North Fork episode, and then, as luck would have it, the show that I was on, on NBC, The New Normal, was canceled. Lena Dunham and Jenni Konner called within 45 minutes of that show being canceled and said, “Just come back. Just come back to us. You always have a place here at Girls.” And I felt so taken care of and protected by them, and very, very lucky to be a part of the show again. So they sort of adjusted some things and shoved me back in the show.

That had to help with the blow of the show getting canceled.

Yeah, it was tough. Cold comfort, but NBC canceled all of their new comedies last year. My friend Laura Benanti, who was on Go On, she and I were talking throughout the whole process, and our shows were the last ones to get canceled. And we were like, “Well, at least we both got canceled.” [Laughs.] “At least no one was left out.” It was such an educational experience about what it was to do a network show. That was the big takeaway. I feel so lucky to be working at Girls because there’s so much time to develop the story and what you’re doing. And just the structure in which a network show is filmed, you don’t really have that time. There was no time to reflect or think about anything.

What’s next for you besides more Girls?

Lots more Girls. I’m writing a lot, actually. I’ve been very encouraged by Judd Apatow and Lena Dunham to write some more, so I’m working on that. And I gotta get to singing again, because I’m doing this Carnegie Hall thing [The New York Pops, on March 21]. I don’t wanna fuck that up.