Before the territorial elections of 1959, Maga agreed that the R.D.D. would field candidates only in the north of the country if in return Apithy's Republican Party of Dahomey (P.R.D.) ran only in the south. The result of the elections was that the P.R.D. received 37 seats with 144,038 votes, the R.D.D. received 22 seats with 62,132 votes, and Justin Ahomadégbé-Tomêtin's Dahomey Democratic Union (U.D.D.) received 11 deputies for its 162,179 votes. What followed was described by Matthews as "an immediate explosion". Supporters of Ahomadégbé-Tomêtin took to the streets in rioting so severe that French soldiers were called in to restore order. Following mediation by Félix Houphouët-Boigny, Apithy and Ahomadégbé-Tomêtin agreed to divide between them 18 contested seats in a southwest constituency. However, Ahomadégbé-Tomêtin made it clear that he would not agree to let Apithy retain the office of Prime Minister of Dahomey. Maga was chosen as a compromise for the premiership, and was voted into this post on May 22, 1959.