When he was 22, Yehia Hamed joined a banned organization whose members often wound up in prison.

A decade later, Hamed was the campaign spokesman for the winning candidate in Egypt’s first democratic presidential election, going from persecuted to powerful with dizzying speed.

The fall has come even faster. On Wednesday night, with a coup underway and troops pulling up outside the office where he presided as a minister, Hamed fled through the parking garage.

Now Hamed and other Muslim Brotherhood leaders face what they see as a stark choice: a return to oppression or a bloody fight against a military that has held sway in this country for six decades.

For a group that has toggled throughout its history between violence and peaceful opposition, the killing by security forces of dozens of Brotherhood supporters on Monday left its members angry, embittered and at risk, analysts said, of careening toward a more militant and radicalized future.

“The new regime is sending a clear message that [it] is determined to kill, detain political figures, stop media channels,” Hamed wrote in an e-mail after Monday’s violence.

He and other ousted officials vowed more protests and delivered emotional speeches. Bloodied victims at the Brotherhood’s field hospital, set amid a sea of supporters camped out in eastern Cairo, said the “massacre” by Egyptian security forces had only solidified their resolve.

But analysts say the group, founded in 1928, is at a critical crossroads.

Ousted president Mohamed Morsi and a circle of aides, all Muslim Brotherhood loyalists, remain imprisoned incommunicado at the headquarters of the Republican Guard, Brotherhood officials said. Egyptian security forces have rounded up other Brotherhood leaders and shut down two satellite channels deemed sympathetic to the Islamists. Security officials have leaked reports that raided Brotherhood offices had stockpiled weapons.

Whether the Brotherhood will be allowed back onto Egypt’s new political stage is rapidly becoming the critical question, said Samer Shehata, an expert on the movement at the University of Oklahoma.

“If you are pushed out of the political process, then one possibility is a resort to arms,” Shehata said. He dismissed the notion that Egypt would turn into another Algeria, where the military canceled an election on the eve of a predicted Islamist win in 1991, setting off a decade of civil war.

But could the country “revert to what we saw in the 1990s, when there was low-level and continuous terrorist activity for the better part of half a decade? Yeah,” Shehata said. “I think that’s possible.”

The Brotherhood’s leaders have called repeatedly in the days since Morsi’s ouster for peaceful protests. But at Brotherhood rallies, the tension between those calling for peace and those who want to go further has been audible amid the chants and marching feet.

Three prominent Brotherhood members from Egypt’s Nile Delta led a march from the group’s largest sit-in, outside the Rabaa al-Adawiya Mosque in eastern Cairo, to set up an encampment outside the country’s Defense Ministry at dusk on Sunday. The idea was to amplify “the pressure,” said ­Mohsen Radi, a member of the country’s now-dissolved parliament.

“It will be a peaceful march,” he said, with fellow former lawmakers Ahmed Diab and Farid Ismail at his side.

But once the marchers arrived and settled in for an uneasy standoff, facing troops at the ministry’s gates, young men approached the former lawmakers with urgent advice.

“We need to do something big,” one young man said.

“We need to escalate this,” another said.

In its early years, the Brotherhood maintained an armed wing, and a succession of Egypt’s ­military-backed rulers has accused the group of instigating attacks. But in recent years, the Brotherhood’s leaders have often been a moderate counterweight to more-radical ­voices, preaching peaceful resistance while others demanded violence.

The Brotherhood’s grass-roots charity efforts — providing free health care, food for the poor and education initiatives — won it a mass following in Egypt long before it was allowed to compete in free elections.

After the fall of the military-backed autocrat Hosni Mubarak in 2011, the Brotherhood became the country’s most powerful political player. It rose with such speed and skill that the liberal activists who launched the anti-Mubarak uprising were left blindsided and confused, floundering in the dust of the country’s new politics.

Radi, Diab and Ismail had competed in the last, rigged parliamentary election under Mubarak in the fall of 2010. They ran again — and won — in the nation’s first free and democratic election in 2011-2012. They saw their power start to slip away when a court dissolved the lower house of parliament on the eve of Morsi’s electoral win.

For a year, a Brotherhood presidency meant that their years in the oppressed opposition — of being hauled off to jail in front of their children — were finally paying off.

“Now we’re moving in a direction where it feels like we’re back where we were under Mubarak,” Diab said. “If not worse.”

Hamed, the former minister and Morsi spokesman, was drawn to the Muslim Brotherhood as a young university graduate. He found the Brotherhood’s ideals appealing, describing them as a better society through Islam — “whether through charity, or in politics, or in how you do business, and how you act and deal with other people.”

He rose quickly through the ranks of the movement. And just a month ago, he wore a suit each day to his job as the nation’s investments minister, meeting with foreign companies and local investors each day in a desperate effort to remedy Egypt’s spiraling economic crisis.

He last met with the president just hours before the coup. At 4 p.m. Wednesday, an aide burst into his office. Six army vehicles had pulled up outside.

“My adviser told me, ‘They’re here, and we have to go now,’ ” Hamed said.

In the span of a few hours, Hamed saw his life transform from that of influential political player to potentially vulnerable dissident. He fled to the Brotherhood’s sit-in outside the Rabaa al-Adawiya Mosque and hasn’t left since. “I cannot go back to my home safely now,” he said.

The night of the coup, Hamed took the stage before thousands of angry Morsi supporters.

“The legitimacy that comes from the ballot box is to be respected. But the legitimacy that comes from tanks and weapons — to that, we say ‘No!’ ” he said, raising his fists.

Brotherhood leaders vowed Monday to continue their protests, and despite a call for an “uprising,” they urged their followers to remain peaceful. But increasingly, they have also vowed to sacrifice their lives for the cause.

“God is our flag, and the prophet is our role model. The Koran is our book, and jihad is our path,” Hamed bellowed to the crowd on the night the generals forced Morsi out. “To die for the sake of God is our highest wish.”

Michael Birnbaum, William Booth, Sharaf al-Hourani and Amro Hassan contributed to this report.