The president will be directly elected for the first time in over half a century.
The Somali Parliament passed an electoral law on Saturday, introducing universal suffrage after decades of a clan-based voting system.
The bill, which replaces the complex indirect voting system and grants one vote per person, was approved by 169 members of parliament, with two voting against and one abstaining.
The East African country had been using an indirect election system, where clan delegates selected members of the national parliament, which then chose the president.
Under the new system, the president will be directly elected. The next presidential election will take place in 2026.
The changes also led to the creation of a multiparty system with three political parties.
Despite opposition from Puntland and Juba states, as well as former presidents, President Hassan Sheikh Mohamud, who was elected by parliament in 2022, announced at the end of October that political parties had agreed on the framework for universal suffrage.