BENGHAZI, Libya — The streets of Benghazi lurched between ecstasy and paranoia on Sunday.

A day after Col. Muammar el-Qaddafi’s tanks rolled through its streets, pounding neighborhoods with artillery and killing dozens of people, families who fled the violence drove home defiantly, the bright bundles on top of their cars never unloaded. A butcher shop opened, and men lined up to fix their tires.

There was a party around smoldering tanks on the outskirts of town, a celebration of allied airstrikes on the colonel’s troops. On a road cleared of their enemies, rebel fighters charged south, vowing to recapture the government-held city of Ajdabiya.

But their stronghold seemed far from secure, and around 10 p.m., a firefight broke out in the heart of Benghazi. Men with guns crouched in the streets, firing on one another in front of a hotel filled with journalists. An antiaircraft gun thundered at an unknown target in a nearby school. Cars sped through an intersection, their drivers dodging bullets. More than half an hour later, as the gunfire subsided, members of the hotel’s staff, wielding machine guns, said they had been attacked by Qaddafi loyalists. But nothing was clear.

The rebels, brimming with confidence after the West joined their war with Colonel Qaddafi, bragged of their changing fortunes. But throughout Benghazi, at edgy checkpoints, the same rebels jumped at mere specters and real threats alike, fearful of a fifth column — a sleeper cell, they called it — bent on attacking them at home.