Myanmar has signed a ceasefire with eight ethnic minority rebel groups in a step towards ending decades of civil war.

The move was weakened by the refusal of several other armed groups to join the deal, despite more than two years of negotiations.

The truce was a key goal of President Thein Sein in advance of November elections, which are likely to sweep his army-backed party from power.

Thein Sein signed the agreement on Thursdasy in the capital, Naypyidaw, in a televised signing ceremony attended by the army chief and rebel representatives in ethnic dresses.

The refusal of the larger armies, such as the Kachin and Wa, to sign it prevented Thein Sein from reaching what he had hoped would be the crowning achievement of his five-year term.

Nevertheless, the agreement, called the National Ceasefire Agreement, is seen as a first step towards ending six decades of fighting between the government, dominated by the Burmese majority, and various minority ethnic groups demanding autonomy and control over their natural resources.

The National Ceasefire Agreement is seen as a first step towards ending six decades of fighting in Myanmar [Reuters]

Ethnic groups, representing 40 percent of the country's 52 million people, have found themselves victims of military abuses and discrimination in areas spanning from health and education to road construction and access to electricity.

"The National Ceasefire Agreement is a landmark gift from us to the generations of the future," Thein Sein said at the signing ceremony.

"Even though the agreement is not nationwide yet, we will try harder to gain the agreement with other groups."

Myanmar surprised the world by opening politically and economically in 2011 following a half-century of harsh military rule.

But early reforms have since either stalled or started rolling backward.

That has raised he stakes for getting ceasefire deals with all ethnic armies, one of Thein Sein's biggest pledges.

Source: Agencies