District 9 smells of apartheid. And its no coincidence that is it such, and that the director is South African. Peter Jackson explains in an interview that it really is all about apartheid. According to the NZ Herald:

a multinational corporation, MNU, charged with policing the aliens while trying to find out their technological secrets. When an MNU agent is accidentally exposed to a mysterious alien substance, he finds himself a hunted man.

The Interview continues with Jackson adding that its tough for young film makers and about Neil growing up in the dying days of apartheid and how he had to experience the ugliness and how it affects people. 

As for Blomkamp, he says he has a love/hate relationship with Johannesburg, and that the city's insane crime level gives it a feeling of living on the edge. And it turns out the filming of District 9 coincided with real-life massacres of Zimbabwean refugees living in nearby shanty towns:

It was completely barbaric what happened and that was the same day we started rolling cameras on a film that was about the residents of Joburg wanting a foreign race out. So all of a sudden I am making a film which within South African has this massive political point of view but really that isn't what we set out to do. So I hope that the residents of Joburg don't take it the wrong way.

Sounds like District 9 is gritty and dark. Let's watch it. [NZ Herald]