Sophocles' Antigone, which first came to the stage in Athens in around 442/441 BCE, deals with the aftermath of the famous Seven against Thebes war. In this conflict, Eteocles and Polyneices, the sons of Oedipus and Jocasta, ended up killing each other.
Afterwards, Creon became king of Thebes and decreed that Eteocles should be given a hero's burial, whereas Polyneices should be left on the battlefield as food for dogs and birds. Creon declared that anyone who buried Polyneices would "be stoned to death before the city" (Ian Johnston translation).
After Creon discovers that Antigone has buried Polyneices, though, he decides not to have her stoned, but that he will "hide her in a cavern in the rocks / while still alive". Thus, it appears that Antigone will starve to death. Eventually, though, Antigone will kill herself.
Creon is in a notably difficult position in the play Antigone. The city of Thebes has undergone numerous misfortunes, including the death of Laius, a plague, the discovery that the city's savior Oedipus actually murdered his father and married his mother, and finally the fratricidal wars between the brothers Polyneices and Eteocles. In light of these events, Creon is trying to restore some semblance of order and normalcy to the city. Because of this, he makes the harsh decision that while Eteocles shall be buried with honor, Polyneices' corpse shall be left out for the birds and beasts that feed on carrion. He decrees that anyone attempting to bury the corpse of the traitor shall be stoned to death.
When Antigone is identified as the culprit trying to bury the body, Creon is confronted with a dilemma. Not only is Creon Antigone's uncle but Antigone is engaged to Creon's son Haemon. In Greek religion, killing or harming a relative calls down the vengeance of the gods not just upon the perpetrator but also upon the community as a whole. Thus rather than actively kill Antigone, Creon orders her walled up in a cave. If she starves to death, that will not bring ritual pollution and the gods' anger on Thebes and Creon; in a sense, Creon is trying to escape the displeasure of the gods on a technicality.
Of course, one can never escape divine justice in Greek plays, and when Antigone commits suicide, tragedy ensues with Haemon, Creon's son, and Creon's wife, both also committing suicide.