CAIRO — When Russia scored its third goal against Egypt in the World Cup last week, the tidal wave of heartache that rippled across Cairo seemed to land squarely on the broad shoulders of Mahmoud Abdel Razek.
The burly accountant had already spent the previous hour perched on a rickety chair outside a tiny cafe on Kasr al-Aini avenue, its usual flood of traffic now strangely quiet, with his eyes glued to a small television atop a pile of red crates.
He stamped his feet. He slapped his thigh. He banged the small gold tea table at his side, muttering prayers and soft curses. But after the third goal, he couldn’t bear it any more.
On screen, Mohamed Salah, Egypt’s star striker who has acquired Godlike status here, clumped his famous curly hair in his hands, despair etched on his face. Mr. Razek mirrored the gesture.
“We thought God was with Egypt,” he said in a choked voice, motioning to the sky. “But no.”
Egyptians, it seems, just can’t catch a break.
Already, their country is going through bitter times. The prices of water, electricity and fuel have soared in recent weeks. Censorship is rampant and tens of thousands of political prisoners are in jail.
Some experts warn that under President Abdel Fattah el-Sisi, Egypt is sliding from authoritarian rule into a totalitarian system where even a smidgen of dissent is intolerable.
Even soccer, the nation’s most beloved sport, is carefully controlled. Domestic games have been played before empty stadiums because of a ban on crowds at soccer games instituted in 2012, driven in part by fears that opposition forces could harness the power of a large public gathering.
But then the World Cup came along and with it, a cloudburst of unfiltered national happiness.
For the first time in 28 years, the national soccer team, known as the Pharaohs, qualified. And they got there courtesy of Mr. Salah, a goal-scoring machine who has rocketed to global fame in the past year, fueled by the love of his soccer-mad compatriots.
Mr. Salah is a soccer magician, the ball seemingly glued to his left foot as he weaves around defenders before smashing it into goal. He mostly plays for his club, Liverpool, where he scored a record 44 goals last season in a blazing performance that catapulted him to the ranks of superstars like Cristiano Ronaldo and Lionel Messi. But in this World Cup, he represents his country, Egypt.
The streets of Cairo exploded with joy in October when Mr. Salah scored a dramatic last-minute goal against Congo that propelled the national side into the World Cup finals. Egyptians, riven by so much fear, division and bloodshed since their Arab Spring uprising in 2011, had finally found an undisputed hero.
“Salah is the king,” said Moataz Badr, a 16-year-old high school student, as he left a street cafe in the Cairo district of Agouza after a recent game. “King of Liverpool. King of England. King of Egypt.”
But sport has little respect for fairy tale endings, and intoxicated hopes that Mr. Salah could propel Egypt to the second round of the World Cup crashed to the ground this week. Yet few Egyptians are giving up on Mr. Salah.
In a country where hope is fragile, many see him as a once-in-a-generation star — a moral as well as a sporting force, an ambassador for country and faith.
Stories of his charitable giving and humility have become the stuff of legend. He lavishes money on schools and ambulances in Nagrig, his small hometown in the Nile Delta, and avoids hobnobbing with wealthy business figures.
A devout Muslim, he prostrates himself as if in prayer after scoring — a gesture that shattered cultural barriers even with soccer fans in Britain.
“If he scores another few, then I’ll be a Muslim too,” goes one Liverpool chant.
He unifies Arabs too. After Mr. Salah declared on Facebook that he was wearing his soccer boots on behalf of 100 million Egyptians, fans across the Middle East jumped in. “King Abu Salah, add 20 million Syrians,” said one. “Add 50 million Iraqis,” said another.
That kind of popularity can be dangerous in a country like Egypt. After Mr. Sisi won re-election in April in a widely discredited vote in which 1.7 million votes were spoiled, some voters crossed out the president’s name and wrote in Mr. Salah’s.
A law introduced this month threatens anyone with more than 5,000 followers on Twitter with criminal prosecution if they broadcast false news. Mr. Salah has 6.4 million followers.
Famous singers, belly dancers and even puppets have been jailed or silenced for saying the wrong thing.
Last year Mohamed Aboutrika, who captained Egypt’s soccer team for a decade until 2013, was placed on a terrorist watchlist last year for alleged ties to the banned Muslim Brotherhood group. He currently lives in exile in the Gulf nation of Qatar.
In interviews, Mr. Salah has studiously avoided talk of politics, and insisted he was not phased by the crushing pressure of shouldering the hopes of 97 million Egyptians.
“They are not a weight on me. They are driving me,” he said.
But for the fans, this World Cup has been a tear-streaked ride.
A beefy tackle by Real Madrid defender Sergio Ramos in May, three weeks before the contest, left Mr. Salah with a shoulder injury that raised anguished fears he might miss the World Cup.
“The Night Egyptians Cried: Ramos the butcher dislocated Salah’s shoulder,” howled a headline in the Egyptian newspaper Al Masry Al Youm.
Mr. Salah missed Egypt’s first World Cup match against Uruguay, which the team lost 1-0. When he did finally appear on Tuesday, against host nation Russia, his only score was a consolation penalty that brought the final tally to 3-1.
After the game, emotions ran high.
In the Nile Delta city of Tanta, a fist fight erupted at a cafe after one customer spat at the television and cursed the national team. Ahmed Abdulla, a taxi driver watching the brawl, suffered a scalded leg after a friend kicked over a table loaded with teacups.
“I don’t care,” he said. “The goal was more painful than the burn.”
Elsewhere, shellshocked fans wept quietly or walked away silently. In one Cairo cafe, men left without paying for their drinks and the waiters didn’t have the heart to stop them.
Since then, the frustration has spilled into a social media war with Egyptians exchanging sharp retorts calling on Mr. Sisi to resign or defending his record. In Chechnya, where the Egypt team is training, the autocratic leader Ramzan A. Kadyrov made Mr. Salah an honorary citizen.
On Monday, Egypt plays its third and final game against Saudi Arabia, the competition’s lowest ranked team. Mr. Salah is expected to score. Although Egypt cannot progress to the next round, a win could salve the country’s bruised morale, said Hatem Maher, a sports journalist with the state-owned Ahram Online news website.
If nothing else, the roller-coaster World Cup ride has offered a pointed lesson to Egyptians conditioned by decades of strongman rule.
“It shows that we can’t rely on one guy,” Sabir Mohammed, a carpenter, said after the Russia game. “We have to learn to play as a team.”
Follow Declan Walsh on Twitter: @declanwalsh
Nour Yousef contributed reporting.