In a room sparsely furnished with a desk and wooden chairs, a man instructed Baraa and two other recruits on the values of Islam and a life of sacrifice. When his turn came, Baraa placed his hand on the Quran, the Muslim holy book, and swore "unwavering loyalty and obedience."
With that oath 10 years ago, Baraa joined the Muslim Brotherhood, an exclusive, secretive and disciplined movement that sees itself on a divine mission to establish Islamic rule.
The story of Baraa, 24, and his extended family shows the strength of the Brotherhood: Its cohesion, careful vetting of members and strict rules have propelled an underground movement into a global network that seized power in the Arab Spring. However, some argue that the same closeness and authoritarian nature has worked against the Brotherhood, which now faces challenges to its power throughout the region.
The Brotherhood was toppled in Egypt in a July military coup, and former president Mohammad Morsi will go on trial in November. The coup is also threatening the 6-year-old rule of its Palestinian branch, Hamas, in neighboring Gaza, because the Egyptian military has closed smuggling tunnels under the Gaza-Egypt border, depriving Hamas of millions of dollars in foreign donations and customs revenue. In several Gulf Arab states, the movement has been targeted in a crackdown, and Tunisia's Brotherhood-dominated government faces a backlash.
"They fail to make the transition from a closed organization into an open and broad-based transparent government," Fawaz A. Gerges, director of the Middle East Center of the London School of Economics, said of the Brotherhood. "They behaved, while in government, exactly as they behave internally."
Over several months, AP reporters had rare access in Gaza to the Rantisis, a prominent Brotherhood family that reflects both the deep loyalty of followers and the worries and divisions brought on by recent dramatic setbacks.
The Rantisi family is the perhaps the closest thing to a political dynasty in Gaza's Brotherhood.
Rantisi patriarch Ali, a wealthy landowner, fled his home village in the 1948 war over Israel's creation for the Khan Younis refugee camp in Gaza.
One son, Abdel Aziz, rose in the ranks of the Brotherhood and spent years in and out of Israeli prisons for Hamas activities. In 2004, three weeks after being named Hamas chief in Gaza, Abdel Aziz was assassinated by Israel in a missile strike.
Three other sons, Mohammed, Salah and Nabhan, by then held various positions in the Brotherhood, which formed the core of their lives.
The Brotherhood selected a wife for Mohammed from the movement — Kifah, a devout woman from a wealthy merchant family. It also gave the orthopedic surgeon $2,000 to set up a clinic. In return, Mohammed, 55, treated patients for free once a week at a mosque, paid 2.5 percent of his salary in monthly dues and once sheltered a Hamas bomb maker at the top of Israel's wanted list in his home.
Now Mohammed's three grown children, including Baraa, have joined the Brotherhood, and the younger three are expected to do so eventually.
The Rantisi family reflects the basic recruitment principles of the Muslim Brotherhood: Family and religion.
The neighborhood mosque is the traditional base, particularly in areas where Brothers cannot operate openly. There they coach football teams, organize day trips and tutor students for free, while scrutinizing potential recruits, said Baraa's uncle Nabhan, 58, a former recruitment chief in Khan Younis. They also recruit at high schools.
Smokers and slackers are disqualified, while the most dedicated mosque regulars are offered Brotherhood "try-outs," said Nabhan, a TV and radio technician.
During observation, applicants are expected to perform the five daily prayers at the mosque, rather than at home, particularly the one at dawn, seen as a test of true commitment. Brothers-in-waiting are assigned religious books for discussion.
In the past, applicants had to answer a few questions at the end of probation. Now they have to pass written and oral exams and score at least 70 out of 100. Nabhan said the failure rate in his area was 10 percent.
Hamas has become more selective, Baraa explained.
"We are in the government, and everyone wants to join," he said from his sixth-floor office at a Hamas polling and research center. "Lots of people come for jobs."
Hamas grew out of the Brotherhood in 1987 and is unique in the movement because of its violent struggle against Israel, but follows the same principles as the other branches.
New members are accepted after probation periods of up to three years. Financially successful Brothers serve as benefactors and the movement arranges scholarships for its most promising members.
The smallest unit of the Brotherhood is a "household" of three to five members who during periods underground — such as before Israel's withdrawal from Gaza in 2005 — are not told of the existence of others. Households report to captains, who in turn report to supervisors in charge of mosques.
Baraa's uncle Salah, 52, a gynecologist and Austrian-trained infertility specialist, is a supervisor in charge of about 500 Brothers in a neighborhood near Khan Younis. He decides how to spend the monthly membership dues. One Brother recently got 300 shekels ($84) toward his university tuition, and another $200 toward wedding expenses.
As in Egypt, the Brothers in Gaza have built up an extensive network of clinics, kindergartens, schools and welfare programs as a base for their political support.
The Brotherhood extends from North America to Bangladesh. Brothers in Qatar, Turkey, Malaysia and other countries offer scholarships to Gaza students such as Salah's son Mohammed, who is studying medicine in Tunisia.
Despite its close-knit nature, the Brotherhood — along with the Rantisi household — is now split over direction, amid the crisis in Egypt and its spillover into Gaza.
The biggest question is how tolerant the Brotherhood should be in power.
Ahmed Yousef, 62, who runs a Hamas-affiliated think tank, "The House of Wisdom," thinks the Brothers should emulate more liberal Turkey, ruled by an Islamic-rooted party, though even there protesters complained of an erosion of freedoms and secular values.
"We can't handle the burdens of power alone," said Yousef, who earned an advanced engineering degree on a Brotherhood scholarship. "I think we made a mistake when we thought that we can control the street, and when we thought we can impose our vision on society."
However, hard-liners hold sway in Gaza. They say Hamas can only be strong in power, and must oppose making significant concessions to potential partners, particularly the Fatah movement of Western-backed Palestinian President Mahmoud Abbas.
In the meantime, the Brotherhood is finding that power has not translated into popularity. An internal Hamas poll in February indicated that 70 percent of Gazans have a negative view of the government's campaign to collect revenues, Baraa said, after years of anarchy without paying bills.
An independent poll conducted in September showed only 21 percent in Gaza had a positive view of their government, down from 36 percent three months ago. More than half of the 1,200 respondents said conditions are bad or very bad.
One reason may be the financial squeeze after the closure of the Egyptian tunnels, along with a sharp loss of money from Iran, a benefactor now upset because Hamas did not support embattled Syrian President Bashar Assad. Hamas has only paid partial salaries to government employees for three months, and some ministries have slashed budgets by 80 percent.
In Egypt, the backlash against the Brothers grew in response to their accelerated attempts to entrench Islamic rule. In Gaza, an overwhelmingly conservative Muslim society of 1.7 million often goes along, but has pushed back at times.
Hamas has banned women's participation in a U.N.-sponsored marathon. And in April, police rounded up more than two dozen young men who wore low-waist pants or gel-styled spiky hair, and shaved the heads of several. Some Hamas members and human rights groups protested, and the campaign was quickly called off.
Baraa criticized the head-shaving policemen on Facebook, saying their behavior harmed Hamas' image. But his uncle Salah said police acted properly, and those violating Islamic codes should not be tolerated.
Baraa's mother falls somewhere in between: She opposed the police crackdown, but has limits when it comes to personal choice.
She said she cannot fathom a Hamas government tolerating the sale of alcohol in shops — as is done in the West Bank, administered partly by Fatah. With her two grown daughters, the debate is not over whether they can wear Western clothes, but over how loose or tailored their Islamic robes should be.
In general, Hamas has cracked down hard on women. After six years of Hamas rule, few women dare appear in public without a headscarf. Schoolteachers and principals — many installed since the Hamas takeover — have taken to shaming holdouts against robes and headscarves.
Hamas police have stopped young couples in the streets, demanding to see a marriage license. And female Hamas members harangue women in markets about not wearing clothing that is sufficiently concealing.
Even within the Brotherhood, the role of women is debated. Women have a separate organization within the movement, and are mostly involved in health, education and welfare, not political strategy. But during a recent women's leadership meeting, Kifah said, one participant demanded to know how much longer women would be kept out of the top decision-making body, the 15-member political bureau.
Hamas critics in Gaza view the Brothers as religious zealots.
"Hamas doesn't accept the other," said Samagh Rawagh, 33, an activist for women's rights. "They want people under them, not equal to them."
Yet the Brothers consider themselves moderate, particularly when compared to Salafis, who preach an ultraconservative form of Islam. Salafis have grown more popular during the Arab Spring, including in Egypt, and some argue that competition with them for religious voters has forced the Brotherhood toward more hard-line positions.
Baraa embodies both the tradition and the modern pressures within the movement. He grew up in a strict Brotherhood household. The tone was set by Kifah, 47, one of the first Gaza women in the 1980s to veil her face. Kifah is the highest-ranking Rantisi in the movement, among just five women in the 51-person Shura advisory council, and a top official in the Religious Affairs Ministry.
Baraa, stylish in Ray-Ban sunglasses, slim-fit khakis and beige moccasins, has challenged his mother's contention that music is a gateway to sin.
"From fifth grade, I had hot discussions with her," said Baraa, who writes poems and downloads opera and rap from YouTube. "She'd say, 'someone needs to break your head,' and I told her, even if they did, it wouldn't change my views."
But he has also embraced the Brotherhood way.
As a child, he learned the Quran by heart. By his early teens, he was active in his school on behalf of Hamas. At one point he stole the principal's keys to get into locked classrooms to distribute the Hamas student magazine.
The rigorous religious training helped him gain acceptance into the movement when he was 14, rather than the usual 17.
Two years ago, Baraa asked his mother to find a bride from the Brotherhood, someone from a "highly respected family" with fair skin and soft hair. After visiting seven families, his mother settled on Abrar, daughter of a founder of the Hamas military wing. The match was sealed during a formal meeting of the two families, and Baraa and Abrar.
They now have a 10-month-old son, Mohammed, and live in the same building as Baraa's parents.
"I am very happy with her," Baraa said. "My first present for her was a face veil. My wife is mine. No one else should see her face."
Baraa walks a fine line, saying the Brotherhood gives his life meaning but goes astray when it imposes its views on others, especially while in power.
"I believe Hamas is for its members," Baraa said, "But the government is the mother of all."