In a stunning political upset, two-term Sri Lankan President Mahinda Rajapakse lost Thursday’s election to a defector from his own party, Maithripala Sirisena. With Sirisena’s rise to power comes hope that he will revive the country’s parliamentary democracy and work more closely with ethnic minorities to encourage political reconciliation nearly six years after the civil war ended in the country.

Sirisena had been a Health Minister in Rajapakse’s Cabinet and the General Secretary of the Sri Lanka Freedom Party (SLFP) when he decided to break from the government and run against Rajapakse last November.

Most observers, up until the last few days, believed Rajapakse would eke out a victory since he maintained control of the government machinery. Fears were also high that Rajapakse’s supporters would engage in violent tactics to try to cow the opposition.

But there was little violence during the voting process and turnout appears to have been high at around 70 percent in most areas. The minority Tamil and Muslim communities threw their support behind Sirisena, in hopes that he will make an effort to encourage national reconciliation, unlike Rajapakse, who had taken a triumphalist position following the government’s defeat of the Liberation of Tamil Tigers Eelam (LTTE) and did little to acknowledge grievances of the peaceful Tamil community.

Votes for Sirisena from the majority Sinhala population were driven by increasing disillusionment with Rajapkse’s nepotism and concentration of power into the presidency. In 2010, Rajapkase scrapped a constitutional two-term limit for the presidency. He further thwarted the system of checks and balances by removing the chief justice of the Sri Lankan Supreme Court in January 2013. Press freedom also suffered under the Rajapakse regime, and he surrounded himself with family members, appointing his brothers to the positions of Defense Minister, Economic Development Minister, and Speaker of the Parliament.

Sirisena has pledged to reduce the powers of the presidency and return the country to a parliamentary democracy within three months.

The election also will likely have major implications for Sri Lanka’s foreign policy. Sirisena has pledged to put ties with India, China, Japan, and Pakistan on equal footing—a significant departure from Rajapakse’s pro-China policies. The Rajapakse government’s recent decision to allow two Chinese submarines to dock at Sri Lankan ports alarmed Indian officials, who are wary of China’s increasing influence in their backyard. Sirisena went so far as to say, “We will have a balanced approach between India and China, unlike the current regime, which was antagonizing India almost by its closeness to China.”

The election of Sirisena could also help provide a fresh start in U.S.–Sri Lanka ties, which have soured over the last few years, primarily over a lack of responsiveness from the Rajapakse government to questions surrounding the large number of civilian casualties during the final days of the government’s war with the LTTE in 2009 and other human rights concerns.

Sirisena has a huge mandate to fill and must still grapple with entrenched ethnic tensions that have plagued the country for decades. But for the moment it looks like Sri Lankans have a new lease on their future.