ISLAMABAD, PAKISTAN, MAR. 3 -- The leaders of two powerful factions in Afghanistan reportedly agreed today to share power in their shattered homeland for 18 months, then hold elections.

Afghan President Burhanuddin Rabbani and a long-time enemy, Gulbuddin Hekmatyar, met for the first time since the communist government fell last May. Since then, the two men's factions have been primary rivals in a multi-sided war for control that has centered on the capital, Kabul, where an estimated 5,000 have died in 10 months of fighting.

Pakistani Prime Minister Nawaz Sharif called the chiefs of Afghanistan's factions to Islamabad Monday to try to mediate a settlement. Pakistan distributed billions of dollars in military assistance -- much of it from the United States -- to the groups when they were fighting the Soviet-backed government in Kabul.

In announcing the power-sharing agreement, Sharif said "all sides have shown flexibility" in the talks.

Rabbani had been scheduled to return to Kabul today but extended his visit another day in hopes the agreement can be signed by all factions before he leaves, said his spokesman, Mohammed Aziz Murad. Murad said that under the power-sharing agreement, Rabbani would remain as president, Hekmatyar would be prime minister and the two would choose government ministers together.

The agreement still must be ratified by leaders of all 10 Muslim groups that ousted the communists after a 14-year civil war.

Hekmatyar was not immediately available for comment.

The Afghan leaders agreed Tuesday to a cease-fire but refused to say when or how it would be implemented. They also agreed to move their heavy weapons out of range of Kabul and put them under the control of a central military command.

Hekmatyar has been blamed for much of the destruction during the power struggle. But other factions have supported him in opposing Rabbani as president.