Togo's government and six political parties have signed a formal agreement aimed at ending years of turmoil.
President Faure Gnassingbe promised to make the deal work
Under the accord signed in Lome, a transitional government will be set up to include the opposition parties.
The accord comes after a political crisis engulfed Togo following last year's disputed presidential elections.
It calls for the creation of an independent electoral commission to organise and supervise transparent and democratic elections.
"What is important is to respect the spirit and the letter of this accord and not to create unnecessary problems," President Faure Gnassingbe said at the signing ceremony.
"I will not shirk my responsibilities, and I will do everything to make this political contract a reality."
Burkina Faso's President Blaise Compaore, who hosted talks among the Togolese factions, also signed the agreement.
Veteran opposition leader Gilchrist Olympio and his Union of Forces for Change are included in the deal.
The agreement seeks to bring a wider regional representation in a government which had been accused of domination by people from the north of Togo.
President Gnassingbe was sworn in by the military in February last year following the death of his father, long-serving President Gnassingbe Eyadema.
Following a local and international outcry, President Gnassingbe agreed to elections in April, which he won amid allegations of fraud.
More than 500 people were killed in violent clashes between the security forces and opposition supporters protesting about the alleged fraud.
Some 35,000 people fled into neighbouring Benin and Ghana.