The future stinks.

Nobody knows that better than Max (Matt Damon), the tatted-up, shaven-headed ex-con hero of “Elysium” who’s grubbing out a subsistence in the Los Angeles of 2154. The L.A. of writer-director Neill Blomkamp’s follow-up to his breakout 2009 sci-fi hit “District 9” is a pestilential microcosm of life on Earth. Rotted buildings stretch to the distant skyline and the impoverished populace chokes on dust so thick it almost blots out the sky. Almost.

Almost, because through the gritty pollution, way high up in the sky, Max and the rest of Earth’s downtrodden denizens can glimpse a gleaming white ring. Called Elysium, it’s a vast circular space station to which Earth’s rich and powerful have fled and made a paradise for themselves. It’s a place of megamansions, golf courses and even pristine rivers (this station is really huge).

Up there is, essentially, heaven, and its residents want to keep the ground-bound rabble out at all costs. Tasked with that particular duty is the station’s secretary of defense, played by Jodie Foster with a peculiar, unplaceable accent, a flinty glare and very severe tailoring. When shuttles from the surface full of desperate refugees approach the station, she snarls “Shoot them down.” Kaboom. Keep out.

Unlimited Digital Access. $1 for 4 weeks.

When Max gets irradiated in an industrial accident, he learns he’ll be a goner in a mere five days. The only way he can hope to escape his fate is to somehow get up to Elysium, where each of those megamansions is equipped with a high-tech get-well machine that instantly cures all ills.

He submits himself to a gruesome operation that merges his ailing carcass with a so-called metallic exo-suit that gives him superstrength. Thus equipped, he fights to get aboard Elysium.

His battles, with a raving commando killer wildly overplayed by “District 9” alumnus Sharlto Copley, are impressive, full of futuristic CGI flying machines and impressive heavy weaponry.

The action sequences are rousing, but what sets “Elysium” apart from the summer’s other boom-boom blockbusters is Blomkamp’s critique of a society riven by class and racial differences (Earth’s populace is multiethnic, Elysium’s is almost all white) and oppressed by an all-seeing surveillance state.

His critique is hardly nuanced (his “District 9,” about the oppression of immigrants, is much more measured), but few mainstream moviemakers have painted as sprawling and densely detailed a portrait of humanity in extremis as Blomkamp does here.

Soren Anderson: