The Thebans repulsed each assault, but in the course of battle, Eteocles and Polyneices killed each other.
Creon then became king of Thebes and gave Eteocles, his ally, a hero's burial. Creon considered Polyneices a traitor, so he decreed that his body be left unburied, to rot in the sun outside the city gates. To the Greeks, this was a terrible punishment: Their holiest laws demanded that certain burial rites be performed, or else the soul of the dead person would be condemned to eternal unrest.
This is the basis of Creon's conflict with the strong-willed Antigone. As you will see, she believes that God's laws must be obeyed, whatever the consequences.