Updated

The speaker of Somalia's parliament said Tuesday that a vote to elect a president will be held soon despite objections by the incumbent, an indication that a disagreement between the top two leaders is far from resolved.

Sharif Hassan Sheik Aden said that President Sheik Sharif Sheik Ahmed has to abide by the law, which calls for elections when the government's term expires in August.

"If we don't elect a president and speaker, there will be no law that in the future can prevent anyone from claiming the president's and speaker's positions. That is why elections are needed to be held," Aden told The Associated Press in an interview in Nairobi.

Aden and Ahmed failed this month to agree on how to deal with the upcoming transitions, even after holding four one-on-one meetings in the Somali capital, Mogadishu.

The Somali government spokesman did not immediately respond to calls seeking comment. The president's office said it had no immediate comment.

Hareed Hassan Ali, a spokesman for a parliamentary committee assigned to prepare the elections, said the vote will be held in July or August.

Ahmed's government has asked for a one-year extension to give it time to try to break the hold that the country's most dangerous militant group, al-Shabab, has on Somalia's south and central regions.

Pro-government forces have made gains against the insurgents in the capital in recent months, and are now closing in on the city's largest market, Bakara, one of the militants' top financial sources. Government-allied troops have also chased militants from several southern towns along the border with Kenya and Ethiopia.

But Aden said it was wrong to say that a presidential vote would affect the military momentum.

"The public should not be misled. We should not say the country is in a state of war and elections cannot be held," he said. "Ordinary Somalis are not the ones voting in the presidential election. It is the parliament that is electing a president, and the parliament holds its sessions on a regular basis."

Under the country's interim charter, the parliament has the sole power to elect a president and parliament speaker.

Aden, 57, warned that if elections are not held by August, chaos will ensue.

It "is a choice between order and the lack of it," he said. "I believe in holding elections, and to me it is the right path to take."

Aden is in Nairobi to meet with a delegation from the U.N. Security Council later this week.

Many in Somalia suspect that Aden harbors presidential aspirations. He said in the interview that he is interested in becoming president "but everything will depend on how circumstances unfold."

Ahmed was elected for a two-year term in 2009 after his opposition group signed a deal with the government. Ahmed, a former Islamist, headed an insurgent group that called for the removal of Ethiopian forces who entered Somalia in late 2006 to prop up the country's ever-fragile government.

Aden said he and the president are still friends despite their political differences.

"There is no problem between us. We can meet at any time," he said. "The problem is I want to abide by the law."