TRIPOLI, Libya—A nervous limbo, punctuated by gunfire, took hold of Libya's capital Monday, one day after opponents of Col. Moammar Gadhafi rolled triumphantly into the central square here—damping hopes by rebels and their international allies that the strongman's supporters would melt away.

Machine-gun and antiaircraft fire could be heard throughout the day in Tripoli, as residents said loyalist gunmen had taken up positions in several neighborhoods. Rebels who attempted to turn an old police academy into their military headquarters...