The Prime Minister of Ethiopia has submitted a letter of resignation to the country's parliament, saying he was standing down as both the country's leader and chairman of the ruling coalition over a long period of deadly protests.

Hailemariam Desalegn said he felt it was "vital" to step aside to allow reforms. "Unrest and a political crisis have led to the loss of lives and displacement of many," he said.

Mr Hailemariam's surprise resignation comes amid the worst anti-government protests in 25 years.

It was first reported by the state-affiliated Fana Broadcasting Corporate (FBC), which said the prime minister "tried his utmost effort to solve the crisis in his country and he is resigning now to be part of a solution to it".

Ethiopia has been rocked by months of protests demanding wider freedoms that have left hundreds dead and tens of thousands detained. The government in recent weeks released more than 6,500 detained opposition figures, journalists and others after the prime minister in a surprise announcement in January said he wanted to "widen the democratic space for all."

The protests have disrupted life and business in one of Africa's fastest-growing economies.

Mr Hailemariam, 53, will continue in his role until the "power transition is completed," the FBC report said. He also seeks to unseat himself from the ruling Ethiopian People's Revolutionary Democratic Front, the report said.

Ethiopia's demonstrations demanding wider freedoms began in late 2015 and engulfed much of the restive Oromia and Amhara regions before spreading into other parts of the country, leading to a months-long state of emergency that has since been lifted.

Ethiopia's government has long been accused of arresting critical journalists and opposition leaders. Rights organisations and opposition groups have called for their release, saying they were arrested on trumped-up charges and punished for their points of view

The academician-turned-politician has led Ethiopia since 2012 after the death of former strongman Meles Zenawi. He also served as deputy prime minister and foreign minister under the former leader before assuming power. He also was elected chairman of the African Union in 2013.