Egypt's generals awarded themselves sweeping political powers in an 11th-hour constitutional declaration that tied the hands of the country's incoming president and cemented military authority over the post-Mubarak era.

The announcement on Sunday night came as early presidential election results put the Muslim Brotherhood's Mohamed Morsi ahead of his rival Ahmed Shafik, Mubarak's final prime minister and an unabashed champion of the old regime. But with thousands of polling stations yet to declare following the two-day runoff vote, the overall winner was too close to call.

Pro-change activists and human rights campaigners said the junta's constitutional declaration – which came just days after judges extended the army's ability to arrest civilians and following the dissolution of the Brotherhood-dominated parliament by the country's top court – rendered the scheduled handover of power to a democratically elected executive meaningless.

The Brotherhood was quick to label the declaration "null and unconstitutional", raising the prospect of a dramatic showdown within the highest institutions of the state.

In a final runoff election marked by relentless fear-mongering and negative campaigning on both sides, many polling stations remained near-empty for much of the two-day ballot – with potential voters seemingly put off by temperatures that reached 40C in the capital, and the increasingly oppressive political climate of military-led manipulation and national division that has gripped the country a year-and-a-half after the start of its ongoing revolution.

As ballot counting began inside more than 13,000 schools, the Brotherhood's Freedom and Justice Party insisted that Morsi, 60-year-old engineer, was on course for a clear victory unless state-sponsored electoral fraud dictated otherwise. But local media reports and anecdotal evidence suggested a closer race, with millions backing Shafik, in a last-ditch effort to prevent political Islamists from taking power.

"We have concerns about many violations but up until now we haven't been able to determine whether they will affect the electoral picture as a whole," Nermine Mohamed, a media coordinator for the Morsi campaign, said. "From our surveys on the ground and the main trends witnessed by our campaigners in the street, we are very optimistic that the Egyptian people are voting to protect the revolution and that Dr Morsi is going to win."

Many of those who put an X next to Morsi's name were motivated more by fear of the alternative rather than any endorsement of the Brotherhood's electoral programme. Daila Rabie, co-founder of the Egypt Monocle media outlet, said: "I believe that if Shafik has made it this far then he's likely to make it all the way, and I have to do whatever I can, whatever is in my power, to make this stop - and what's in my power is to vote for the other candidate.

"It's the much, much lesser of two evils," added the 29-year-old. "If Morsi wins there's leeway for opposition, but if Shafik wins the revolution will be completely crushed."

With estimates of the first day turnout as low as 15%, daily newspaper al-Shorouk in its front-page headline on Sunday declared "boycott" the only victor. Many young revolutionaries refused to endorse either of the two well-oiled political machines – the Brotherhood on the one hand and the army-backed remnants of Mubarak's theoretically dissolved NDP party on the other – on the ballot paper, with some instead scrawling in the names of comic-book heroes, belly-dancers or protesters killed by security forces in last year's anti-Mubarak uprising.

"These elections are being conducted under Scaf [the Supreme Council of Armed Forces], which took power when Mubarak was toppled in February 2011], said Omar Kamel a musician and activist who has been one of the leading voices in favour of a boycott campaign. "The bedrock of Scaf's existence is completely illegitimate, and that makes all the fictional legal mechanisms put in place to justify the generals' authority illegitimate as well. This electoral contest will be decided by which of the two big patronage networks can mobilise its footsoldiers more effectively, and the winner will in no way represent the will of the Egyptian people."

Kamel claimed the anticipated meagre turnout would strike a hammer blow at the new president's credibility and make it harder to justify draconian crackdowns by the state against pro-change demonstrators. "Given a choice between eating shit or eating shit, most Egyptians have decided they're not hungry," he concluded.

Those that did choose to participate found themselves drawn into a web of discord that has pitted friend, colleagues and family members against each other amid a toxic atmosphere of distrust. On Sunday one national news outlet exhorted its readers to keep out the Brotherhood in order to prevent Egypt from becoming "the next Afghanistan", and SMS text messages circulated among Egyptians holidaying on the Mediterranean coast warning recipients that if they didn't vote for Shafik they might find themselves unable to take similar vacations ever again. Meanwhile, Egypt's most prominent football star and Brotherhood supporter, Mohamed Abou-Treika, caused a stir by refusing to have his photo taken with a Shafik delegate in a local polling station, opting instead to face the cameras alone wearing T-shirt emblazoned with the words: "The day I give up your rights, I'll surely be dead."

Many Egyptians took to social media to detail family rifts over the presidency, with the hashtag CandidateDomesticFights picking up steam on Twitter. According to local media reports, one Shafik voter in the Upper Egyptian province of Minya attempted to summarily divorce his wife in the polling station after she revealed she would be voting for Morsi.

Although an official announcement of the winner isn't due until later this week, results should become apparent on Monday. But whoever assumes high office will find themselves tangled in a bureaucratic mess, after the latest legal twists awarded legislative authority to the generals and put the constitution-writing process effectively in the hands of the junta, who now claim the authority to contest any proposed clause. In a symbolic reminder to citizens of where political power really resides, army helicopters circled above Cairo and other key urban centres throughout Saturday and Sunday. Some analysts believe that the lack of uproar by traditional political forces at Scaf's "judicial coup", in favour of devoting energy to the presidential race, will prove a major mistake in the long-term.

"The decision to dissolve parliament sounds the death knell to the credibility of the political process in Egypt [and] I think it's hardly worth giving credence to an entire political system that has no credibility," wrote Issandr el-Amrani at the Arabist website . "The only thing I see in Egypt's future is military rule, civil disobedience, and violence. The Scaf is mostly responsible for this, but those who accept this verdict and Scaf taking over legislative powers have their role too. History will remember them."