MONROVIA, Liberia — Soldiers and police officers in riot gear blocked the roads. Even the waterfront was cordoned off, with the coast guard stopping residents from setting out in canoes. The entire neighborhood, a sprawling slum with tens of thousands of people, awoke Wednesday morning to find that it was under strict quarantine in the government’s halting fight against Ebola.

The reaction was swift and violent. Angry young men hurled rocks and stormed barbed-wire barricades, trying to break out. Soldiers repelled the surging crowd with live rounds, driving back hundreds of young men.

One teenager in the crowd, Shakie Kamara, 15, lay on the ground near the barricade, his right leg apparently wounded by a bullet from the melee. “Help me,” he pleaded, barefoot and wearing a green Philadelphia Eagles T-shirt.

“This is messed up,” said Lt. Col. Abraham Kromah, the head of operations for the national police, looking at the teenager and complaining about the crowd. “They injured one of my police officers. That’s not cool. It’s a group of criminals that did this. Look at this child. God in heaven help us.”