Somalia’s political leaders have agreed to hold a long-delayed presidential election on October 10. This was disclosed by Prime Minister Mohammed Hussein Roble’s office on Tuesday, following months of deadlock that turned violent at times.

The office also unveiled the timetable for indirect parliamentary and presidential elections in a statement on Twitter, saying stakeholders had agreed to a road map for a vote following two days of talks in the capital, Mogadishu.

“I commend the leaders of the council and hope the election will be a peaceful and transparent one, based on the agreed-upon schedule and processes,” the prime minister said.

President Mohamed Abdullahi Mohamed, commonly known as Farmaajo and the leaders of Somalia’s five states had been unable to agree on the terms of a vote before his term lapsed in February, triggering an unprecedented constitutional crisis.

The political impasse exploded into violence in April when negotiations collapsed and the lower house of parliament extended the president’s mandate by two years, sparking gun battles on the streets of Mogadishu.

Under pressure, the president, commonly known as Farmajo, reversed the mandate extension and ordered his prime minister to reconvene with the state leaders to chart a fresh roadmap towards elections.

In May, the warring leaders announced plans to commence the multi-stage election process within 60 days, helping ease political tensions.

The timetable announced Tuesday schedules elections for the upper house on July 25, and the lower house between August 10 and September 10.

Both houses are then convened and a vote for the president held on October 10.