Egypt's ruling military council on Sunday issued an amended constitutional document handing it sweeping powers, including legislative control, after a court ruled the elected parliament invalid.
The move was announced on state television as the counting of votes began at the end of a divisive presidential run-off.
As the polls closed at 2000 GMT, the Supreme Council of Armed Forces issued a new constitutional document replacing an original declaration issued in March 2011 after an uprising that ousted the regime of Hosni Mubarak.
The document, a copy of which was obtained by AFP, states that SCAF is retaking legislative power and that a vote to elect a new parliament will not be held until after a new constitution is drawn up by a constituent assembly.
SCAF had in January handed legislative power to parliament, but on Thursday Egypt's constitutional court effectively annulled the body, ruling that a third of its members had been elected illegally.
Presidential polls closed two hours later than scheduled after Egypt's electoral commission extended the vote, in part to allow people a chance to cast their ballots in the relative cool of the evening.
They were choosing between former air force chief Ahmed Shafiq, the last prime minister under ousted president Hosni Mubarak, and the Muslim Brotherhood's candidate Mohammed Mursi.
At a press conference before the polls closed, election commission head Hatem Bagato told reporters that turnout appeared to be lower than the first round held on May 23 and 24, but gave no estimated figures.
The election comes against a backdrop of legal and political chaos, with the Muslim Brotherhood set on a confrontation path after the court ruling ordering the dissolution of the Islamist-led parliament dissolved.
The declaration issued by SCAF late Sunday leaves legislative and budgetary powers in the hands of the military council, which took control of the country after the uprising.
"The Supreme Council of the Armed Forces shall exercise the powers referred to under the first clause of article 56 (on legislative power)... until the election of a new People's Assembly," the document reads.
Such an election cannot be held until a new permanent constitution is written and adopted by a referendum, it adds.
The writing of the new constitution will be carried out by a "constitutional commission representing all segments of the society" and will have three months to complete its work, the document says.
It also grants SCAF a veto right over any article in any draft constitution it considers "contrary to the supreme interests of the country."
Egypt's Freedom and Justice Party, the political wing of the Muslim Brotherhood, has already rejected any attempt by SCAF to retake legislative powers.
And parliamentary speaker Saad al-Katatni, an FJP member, said on Sunday that a constituent assembly appointed by the parliament before the court ruling on Thursday would continue its work.
But it was unclear from the constitutional declaration issued on Sunday whether that assembly, which replaced an earlier grouping, would be allowed to proceed with its work or a new assembly would be picked by the military.
The electoral race has polarised the nation, dividing those who fear a return to the old regime under Shafiq from others who want to keep religion out of politics and fear the Brotherhood would stifle personal freedoms.
The new president will inherit a struggling economy, deteriorating security and the challenge of uniting a nation divided by the 18-day uprising that toppled Mubarak in February 2011.
"The new president will head to the presidential palace amid a terrifying legal and constitutional vacuum," wrote political analyst Hassan Nafea in the independent daily Al-Masry Al-Youm as the polls opened on Sunday.
"A Shafiq victory will not only guarantee the SCAF has one of its men in the highest position of executive power, it will also give it an influential role in building the other political institutions of the new regime," he said.
The steps that have consolidated the power of the ruling SCAF have infuriated activists and boosted those who advocated a boycott of the vote.
Analysts point to the court's decision to annul the parliament, as well as overturn a law that had threatened to bar Shafiq from the presidential race, and a recent justice ministry decision granting the army the right to arrest civilians, as proof of the military's plans to cements its power.
The military says it does not want to stay in charge and has promised to hand power to the newly elected president by the end of the month.