The space invaders, known as the Skrulls, have even managed to penetrate the British Cabinet, impersonating at least three Cabinet ministers, but Brown manages to coordinate the ultimately successful efforts to fight them off.
To do so, he works with a fictional intelligence agency known as MI13 that seems closely modeled on MI5, the real British domestic agency, and MI6, the overseas intelligence agency that is the home base of fictional spy James Bond.
It is all quite a makeover for Brown, who has been tumbling in national opinion polls since taking over for the more charismatic Tony Blair less than a year ago.
Saving the world from alien domination, even in a comic book, can only burnish your reputation. So it is no surprise to find that the comic was written by a Brown fan, Paul Cornell, a successful novelist and television writer who has penned episodes of the popular show "Doctor Who."
"I do admire the prime minister," Cornell said Tuesday.
Cornell said Marvel comics often have real-life politicians as characters, but he said the Brown cameo is not likely to be repeated.
He said he was happy to portray Brown as an effective leader.
"He's marshaling the troops, showing leadership and acting heroically," he said of the alien-busting Brown.
Cornell wanted to make sure that readers understood he was basing the fictional character on the real prime minister.
He told the artists drawing the comic to make sure the character actually looked like Brown, who is shown in the comic wearing his customary dark business suit and tie rather than the formfitting bodysuits often worn by comic book stars.
It was not immediately clear Tuesday whether the comic book was on sale in Britain.
In real life, Brown is under intense criticism from Labour Party backbenchers who fear he is likely to lead the party to a landslide defeat when the next general election is called. He has suffered a number of reversals in recent weeks, sparking rumors that he may soon face a challenge for the party leadership.