[Warning: If you’ve yet to watch Wednesday night’s Cougar Townfinale, avert those peepers…now. The following article contains a major spoiler. Ready? Set? Scoop!]

Holy stroke of genius: Did you see who popped up at Coffee Bucks?!

For those not paying close attention to the second season finale of ABC’s Cougar Town, you missed a scene-stealing guest spot from Community‘s own Abed Nadir. No, not Danny Pudi, the actor who plays Abed (though he was there, too), but Greendale’s resident pop culture guru.

The cameo shouldn’t come as a huge surprise to fans of the NBC sitcom or anyone who follows C-Town executive producer Bill Lawrence on Twitter. After all, in Community‘s “Critical Film Studies,” Abed reveals to pal Jeff Winger (played by Joel McHale) that he’d traveled to Los Angeles to shoot a scene on his favorite TV comedy. And just a few weeks back, Cougar Town‘s Dan Byrd and Busy Philipps appeared in the background of Community‘s paintball finale. So this week, their mutual admiration was simply taken one step further.

“They had Abed have a love of Cougar Town, we had Travis have a love of Community, and once we got wind of what they were having Abed say he experienced out here,” Lawrence explains, “we were going to try to find a way of Danny being a background character and essentially act that same thing out on our show.”

Diehard fans of both shows might notice that the only major difference between what we’d originally heard of Abed’s walk-on and what actually occurred — pants-pooping aside — was that Courteney Cox was nowhere to be seen. That wasn’t an oversight on anyone’s part, says Lawrence, but simply a scheduling conflict that couldn’t be resolved.

Another fun fact about the crossover: Lawrence tells TVLine that neither series’ network (ABC and NBC) or studio (Disney and Sony) had any idea that the two shows were working in cahoots.

“We didn’t even ask permission,” he adds with a laugh, noting that even when all entities discovered this dirty little secret, they were nothing but supportive. “Thankfully, both Disney and Sony are places that want to champion what they feel are under appreciated shows.”

“Unless you’re a monster show, it’s really your own job to promote your show,” Lawrence explains when asked what is really behind the cross-networks love. “One clever way we thought of [drumming up promotion] was to work with a show we really liked — and we all like Community.” Add to that the fact that his former Scrubs counterparts Neil Goldman and Garrett Donovan are now EPs on Community, and you’ve got a winning formula.

Lawrence, however, does advise fans not to look for too much more cameo-making in Season 3 of Cougar Town, because, as he puts it, “We’ve already done this joke.” But fret not: “We will keep our characters’ Community love going, just because it’s real and we love the show. Community deserves the publicity, and I’m intrigued with the idea of stealth cross-promoting.”

Head back to TVLine on Friday for more from Lawrence, including his big plans for Season 3 of Cougar Town.