Results of Egypt’s phenomenally complex election are now more or less complete, and they confirm a decisive win for the Freedom and Justice Party, the political vehicle of the Muslim Brotherhood. (Reasonably full results here; Wikipedia has slightly later numbers, some from unofficial sources. Arabic readers can try the official page.)

The Brotherhood looks like finishing only a few seats short of an absolute majority, with maybe 235 seats in the 508-seat people’s assembly. The second largest party, with about a quarter of the seats, will be Al-Nour, which represents the more fundamentalist Salafi Islamists. The two main secular groups, Al-Wafd and the Egyptian Bloc, will have about 70 seats between them, with the rest distributed among a range of minor parties and independents.

It was understandable for the BBC’s Middle East editor to say that “from the evidence of these election results, if Egypt has a democratic future, it is Islamist.”

However, this is something of a case of deja vu, since that comment was actually made six years ago, following the 2005 elections.

At that time the Brotherhood was still officially illegal, but its candidates were tolerated and allowed to run as independents. The elections were still tightly controlled by then-president Hosni Mubarak, but under pressure from the Bush administration he allowed for more democracy than had generally been the case.

The results were dramatic: having previously been just a token presence, the Brotherhood won about a fifth of the seats — enough to suggest that if fair elections were ever held, it would win a landslide. The US started moving towards dialogue with them as part of its push for democratisation in the Middle East.

But it was a false dawn. Hamas’s victory in Palestinian elections in 2006 brought a reversal in US policy, and Mubarak felt released from any need to display openness. The following elections, in 2010, were comprehensively rigged, with opposition almost eliminated and the Brotherhood reduced to just one seat — a course that led to the Egyptian revolution and eventually brought Mubarak himself to the dock, on trial for his life.

So now history seems to have resumed where it left off. The Brotherhood will now get its chance to govern, although to start with it will have to share power with the generals who have succeeded Mubarak. But all the signals from the Brotherhood have been positive, promising inclusiveness, coalition government, religious tolerance and a firm commitment to democracy.

Since they are both in a sense “Islamist”, it’s not surprising that Western commentary has focused on the conjunction of the Brotherhood and Al-Nour, noting that they will have more than two-thirds of the seats between them.

But the Brotherhood have firmly denied any intention to ally themselves with the Salafists, and there is no real reason to doubt them. The Brotherhood’s whole strategy has been built around presenting itself as a moderate, democratic force; a fundamentalist alliance would put that in jeopardy, giving retrospective validity to Mubarak’s constant warning that “the Mullahs are coming!”

The Brotherhood’s clear preference seems to be for an alliance with Al-Wafd, Egypt’s most established liberal party, which had initially been part of the Brotherhood’s electoral coalition. As Juan Cole notes, “A Brotherhood-Wafd alliance would resemble the government in Tunisia”, which has so far had the most successful transition resulting from the Arab Spring.

That, of course, is also the preferred option of Western policy, although the Americans need to keep their options open — according to The Washington Post, “A first official meeting between US Ambassador Anne Patterson and representatives of the Salafist Party has been scheduled for Sunday.” (It’s not impossible the Americans will find they get on quite well with the Salafists, since they always seem to prefer their allies, the Saudis, to the less fundamentalist Hamas.)

But there are still plenty of roadblocks ahead for the Brotherhood. They need to somehow find a modus vivendi with the military, and then draft an new constitution that will allow political Islam to have its place but not compromise on the country’s secular and democratic character.

Turkey has shown that it can be done. If Egypt can manage the same trick, the Middle East will never be the same again.