This enabled Roh to win by a narrow margin and become the country 's first democratically elected president .
This made Roh the first elected president after the time that the military ruled the country .