Henrik Ibsen is the father of modern drama and his 1882 drama "An Enemy of the People" ("En folkefiende") was one of his more controversial works. In the play Dr. Stockmann discovers that the new baths built in his town are infected with a deadly disease that requires they should be closed until they can be repaired. However, the mayor of the town (the Burgomaster), who is Stockmann's brother Peter, rejects the report and refuses to close the baths because it will bring about the financial ruin of the town. When Dr. Stockmann tries to make his case to the people of the town, the mayor counters by pointing out how expensive it would be to repair the baths and dismisses the doctor for having wild, fanciful ideas. At the public meeting Dr. Stockmann is declared "an enemy of the people" by the Burgomaster.
To really appreciate this particular Ibsen play you have to look at it in the context of his previous dramas, because they all represent a conflict between the playwright and his critics. In 1879 Ibsen's play "A Doll's House" ("Et dukkehjem") was produced, wherein the character of Nora pretends to be a silly little wife in order to flatter her husband, who is revealed to be a hypocritical fraud. The idea that a woman would leave her husband and children was seen as being outrageous and basically obscene. Ibsen upset his audience and critics even more in his next play, "Ghosts" ("Gengangere"), an 1881 drama that again attacks conventional morality and hypocrisy. The topic is of congenital venereal disease but the true subject is moral contamination. Mrs. Alving has buried her husband, a degenerate who has left behind a son dying from syphilis and an illegitimate daughter who is probably going to end up being a prostitute. The play ends with Mrs. Alving having to decide if she should poison her son to put him out of his misery or let his agonies persist.
Again, Ibsen was attacked for outraging conventional morality. The following year after "Ghosts" the playwright responded with "An Enemy of the People" and the character that is most identified with representing Ibsen on stage in Dr. Stockmann. The allegory is quite plain when the play is considered within the context of Ibsen's work during this period, although while Stockmann is portrayed as a victim there is a sense of destructiveness to his behavior. At the end of the play Stockman has decided to leave the town, but then changes his mind to stay and fight for those things he believes are right.
As is the case with most of Ibsen's classic works, "An Enemy of the People" speaks to larger issues than those in conflict in the play. The debate is over the bad water pipes at the new baths, but the true conflict is over the clash of private and public morality. Dr. Stockmann is by far the most idealistic of Ibsen's characters, and that fact that he is opposed by his own brother, the Burgomaster, harkens back to Genesis and the fight between Cain and Able. As was the case with "Ghosts," there is an ambiguous ending where what happens next can be seen as going either way given your own inclinations as a member of the audience.
Both of the Stockman brothers are flawed. Dr. Stockman's idealism is at odds with the practical realities of the world in which he lives while the Burgomaster ignores ethical concerns. Ultimately, Ibsen is not forcing us to choose between the two but rather to reject both in terms of some middle ground. The Burgomaster is certainly old school, believing those in authority get to make all the decisions and that the people must subordinate themselves to the society. But he was the one who made the mistake of putting the new water pipes in the wrong place, so even his claims that he is looking out for the welfare of the community are dishonest. Dr. Stockman argues for individual freedom and the right of free expression, but his attempt to fix the problem ignores any effort at persuasion or building public support. He also seems to take pleasure in be able to show that his brother made a mistake. Still, in the end we have to favor the doctor over the mayor because his integrity is clearly stronger, while still recognizing that his idealism is tragically flawed.