<EM>The Simpsons</EM>' Charlie and the man behind him, Ricky Gervais The Simpsons' Charlie and the man behind him, Ricky Gervais

The British are coming to Springfield! Or at least one of them is, when Ricky Gervais, the boss man on the original U.K. version of The Office, lends his voice to this Sunday's The Simpsons (8 pm/ET on Fox), in an episode that he also wrote. As Charles, Gervais finds himself filling the role of Marge's new hubby via a Trading Spouses-type reality-show swap.

Surprised that it took this long for a Brit wit like Gervais to get his animated due, TVGuide.com asked the actor-writer how his Simpsons stint finally came to be. "I'd heard that [creator] Matt [Groening] was a fan," he tells us. "I think he saw [The Office] on a plane to or from England, before it was on BBC America, and then he bought a British DVD player so he could watch them all." Ultimately summoned to the producers' offices, Gervais says, "They knew The Office by heart, which was so incredible because [The Simpsons] is my favorite comedy show of all time. It's just stunning."

That's right: The 17-year-long (and counting) misadventures of Homer, Bart, Mr. Burns et al play big even across the pond, speaking the universal language of pointed hilarity. "If you speak to anyone in the know, and by that I mean any connoisseur of comedy, forget it, it's the best," Gervais says on behalf of himself and his fellow blokes. "It's the Beatles and the Stones. Homer is the greatest comic creation since Laurel and Hardy.

"When [The Simpsons] nails a joke, they put it to bed," he continues, adding to the heap of praise. "You might as well not visit that particular avenue of observation again because they've done it the best." (Indeed. Just ask South Park's Butters.)

Thus came the tricky prospect of finding fresh fodder for Gervais' visit. Recalling the early brainstorming, he says, "I think it was my girlfriend who asked, 'Have they done a wife swap?' I checked with [writer] Al Jean and he said, 'No, we haven't done that yet.' So I flung some ideas down." The result: Charles' upper-crusty wife trades places  meaning homes and families  with Marge. "My wife thinks she's landed in caveman times  she can't believe how uncouth Homer is  while Marge is the first woman that's been nice to me in years. I instantly fall in love and write her the most excruciating love song ever"  crooned by Gervais himself. "It's just a dreadful, dreadful attempt to woo a woman," he laughs.

As for any wink-winks to fans of The Office, Gervais says the accent he chose for Charles "was a bit of an homage to [David] Brent, just for the people who know the English version of [the show]. I didn't want to do David Brent exactly, and I was not famous enough to play myself, so I did a bit of both, really. The character is so much fun."

Speaking of The Office, Gervais just finished writing (with Stephen Merchant) an episode for Season 3 of the U.S. version, of which he is a huge fan (and on which he shares a cocreator credit). "It's so good. Steve Carell [as boss Michael Scott] is remarkable, I mean remarkable," his predecessor raves. "I watch his performance and I'm thinking, 'He's working so hard and on so many levels.' The Jim and Pam story I think hits the ground running better than we did with [U.K. counterparts] Tim and Dawn... [and] Dwight keeps growing on me."

"They've done so well, the writing is so clever, it's audacious," Gervais continues. "For American network TV, it's a really uncompromising, cult comedy. I want to say "Well done" to NBC for not panicking and watering it down. It was actually a joy to write for it.

"And the strange thing was when I was writing for those characters, I don't think of David Brent and Tim and Dawn, I think of Michael Scott and Jim and Pam," he reveals. "It just flowed."