Egypt’s liberal and secularist groups, long plagued by infighting and poor organization, say the coup that ousted the Islamist president, Mohamed Morsi, has given them a second wind and a fresh chance to unite.

For the second time in 2½ years, young liberal activists ignited a protest movement that provoked a military intervention. They again succeeded in forcing out a president and celebrated in Tahrir Square with fireworks, patriotic anthems — and promises of a better tomorrow.

But it was unclear whether ­anti-Islamist forces have developed a strategy that extends beyond the vague “road map” outlined by the head of the armed forces, Gen. Abdel Fatah al-Sissi, as he announced Morsi’s dismissal Wednesday night. And for liberal activists and politicians who claim to champion democratic values, supporting the coup that ousted Egypt’s first democratically elected leader could present other challenges.

But if the Muslim Brotherhood’s seemingly fast demise has given liberals a fresh boost of confidence, their enthusiasm is rooted less in a clearly defined political strategy than in the conviction that the enemy has been defeated.

The last time around, political analysts say, the liberals botched an important opportunity.

Military rule in Egypt

They fractured from a powerful, unified force standing against Hosni Mubarak into dozens of groups and political parties. They floundered when it came to mobilizing voters. They lacked a single vision and a grass-roots strategy to compete with the far better organized Muslim Brotherhood, which had decades of experience opposing Mubarak and a vast, nationwide charity network.

This time, the liberals swear it will be different.

A new constitution must come first, and the liberals must unify around fewer leaders and fewer parties, said Amr Moussa, a former foreign minister and head of the Arab League under Mubarak who ran against Morsi and others in the last presidential race.

Moussa, who heads the liberal Egyptian Conference party, said it was “very smooth sailing” for the Brotherhood in the last election. “Everyone else was quarreling, except for them.”

In the vote for parliament, which stretched from late 2011 into early 2012, the liberals fell far short of the Islamists’ combined 70 percent majority — haunting politicians such as Moussa as a subsequently Islamist-dominated committee drafted a new constitution.

“I do believe that in the next phase, in the future, this is not going to happen,” said Ahmed Said, chairman of the liberal Free Egyptians Party, who headed the fourth-largest bloc in the country’s first democratically elected People’s Assembly, the lower house of parliament, elected a year after Mubarak’s fall. “We got the lesson.”

Egypt’s highest court dissolved the People’s Assembly last summer on the eve of Morsi’s electoral victory, a move that the Brotherhood and its supporters deemed politicized. Last week, the military ousted Morsi and suspended the constitution. And on Friday, Egypt’s new interim president, Adly Mansour, dissolved the last vestige of Islamist elected power — the upper house of parliament, known as the Shura Council.

The military has placed Morsi and about a dozen of his top advisers under house arrest. Security forces have thrown at least five other Brotherhood leaders in jail, according to Human Rights Watch.

To many who participated in the protests to oust Morsi and his Islamist allies from power, the Brotherhood’s collapse has signaled the death of political Islam in Egypt.

“The Egyptian people will never vote for them again. Anyone who runs in the name of an Islamist movement will not be voted for,” said Islam Badran, a 23-year-old lawyer who said he voted for Morsi but turned resolutely against him, joining last week’s protests in Cairo’s Tahrir Square until Morsi stepped down.

Analysts say there could be any number of scenarios.

“This is an opportunity for them to start from scratch and to do the transition their own way,” said Shadi Hamid, director of research at the Brookings Doha Center. With the Brotherhood sidelined, liberal opposition leaders will have a shot at pushing a constitution that suits their interests, Hamid said. They will be able to run in elections again, against a weakened conglomerate of Islamists.

But they will also have to compete with a host of other actors on the nation’s revised political stage. That includes the powerful military generals, who, during their tenure as rulers in 2011, proved to be repressive and alienated many of the ideals the liberals said they stood for.

The military blocked economic reform efforts, sent thousands of civilians before closed military tribunals and enabled elections before the drafting of a new constitution — a chronology that some liberals blame for the Islamists’ later domination of the political process.

Liberal leaders will also have to negotiate governance with Mansour as well as members of Mubarak’s ousted regime who proved “very important” in forcing Morsi’s ouster and who, like the liberal opposition, have seen an opportunity for rebirth, said Hamid.

Abdullah Mansour, a leader of the Tamarod activist group — which brought thousands into the streets last weekend — said his group is confident that it gained the right to influence the new government when it gathered 22 million signatures in a no-confidence vote against Morsi, an assertion that was impossible to confirm.

Tamarod leaders say they have selected Mohamed ElBaradei, a Nobel Peace laureate and former head of International Atomic Energy Agency, to represent them in governance. But ElBaradei, who was once labeled elitist in the nation’s media and who struggled to find a grass-roots following in the wake of Mubarak’s fall, may face an uphill battle.

And the Islamists are not gone. “We will not compromise or leave the streets until #Egypt’s #Legitimacy is restored by reinstating its democratically elected Prez,” Brotherhood spokesman Gehad al-Haddad tweeted Friday, as thousands of Morsi supporters took to the streets in protest, later clashing with the president’s opponents in violence that left at least 30 people dead nationwide.

The Nour party — Egypt’s largest Salafist party — whose members subscribe to a puritanical interpretation of Islam and have called for the implementation of Islamic law, have also carefully navigated Morsi’s fall. The party’s leader retracted his support for Morsi days before the president’s ouster, then stood with Sissi, along with liberal leaders and religious clerics, as Sissi announced Morsi’s dismissal.

The party remains one of Egypt’s best organized, and some analysts predict it will simply replace the Brotherhood as a leader in future polls.

Hamid, of the Brookings Doha Center, said there’s no telling who or what could divide the country next.

“I think you also have to keep in mind that Egyptian politics is so fluid. People who hate each other now can shift in a year,” he said. “Just because it seems the Brotherhood is on its way out now doesn’t mean that will be the case in a year.”

William Booth, Michael Birnbaum and Lara El Gibaly contributed to this report.