Sri Lanka's Prime Minister Ranil Wichremesinghe defeated an attempt by former ruler Mahinda Rajapaksa to return to power. In this photo, Wickremesinghe waves as he arrives with his wife Maithree Wickramasinghe at a polling station during the general election in Colombo on Aug 17, 2015. Reuters/Dinuka Liyanawatte

Initial counting of votes from Sri Lanka’s general elections showed that former president Mahinda Rajapaksa’s attempt to return to power was defeated Tuesday. The early results showed that the ruling party has already made substantial gains.

The ruling United National Party (UNP) was unlikely to secure an outright majority, but seemed poised to secure enough seats to allow Prime Minister Ranil Wickremesinghe to form a stable government.

"I invite all of you to join hands," Wickremesinghe said, according to Reuters. "Let us together build a civilized society, build a consensual government and create a new country."

According to the early results, Wickremesinghe’s United National Party (UNP) had won 70 seats, one more than the tally of the alliance led by Rajapaksa’s Sri Lanka Freedom Party (SLFP).

"My dream of becoming prime minister has faded away," Rajapaksa told Agence France-Presse. "I am conceding. We have lost a good fight."

Electoral authorities said that the vote was orderly, but there were fears that Rajapaksa winning the prime ministerial role could trigger a power struggle with reigning President Maithripala Sirisena, who has said that he will not appoint Rajapaksa regardless of the voting results. Rajapaksa received 48 percent of the vote in January’s presidential election, losing to Sirisena.

Sirisena said last month that the United People’s Freedom Alliance (UPFA) political combine, led by the SLFP, was set to lose the election. He blamed the outcome on Rajapaksa’s inability to gain support of the country’s Tamil and Muslim minorities, and called on him not to run for parliament.

“There is a wave sweeping all over the world against corruption. I told him that educated people, the middle classes, expect me to bring good governance and you are lacking in that area. So please don’t come forward at this election,” Sirisena said in July.

Sirisena also suspended several pro-Rajapaksa lawmakers from his party’s executive committee Monday.

Rajapaksa’s controversial nine-year reign was marred with accusations of human rights abuses and political suppression that included charges of corruption, violence and intimidation against his opponents, and contribution to sectarian violence involving the country’s beleaguered Tamil minority.

Speaking after he casted his vote, Wickremesinghe said he was confident that he could form a new government that would “consolidate the January 8 revolution,” referring to the electoral defeat of Rajapaksa's government.

Elections Commissioner Mahinda Deshapriya said that the final party positions were expected by mid-Tuesday, while individual votes for candidates would arrive later in the day. Sri Lanka’s electoral system has a mixed format that includes district-level proportional representation as well as a so-called list system that gives each party extra parliamentary seats based on the number of votes they have gathered from across the country.

Deshapriya described the election as one of the most peaceful in the history of the Asian country.