Rebels swept into the heart of the Libyan capital, meeting only sporadic resistance from forces loyal to Moammar Gadhafi who were trying to protect a rapidly shrinking stronghold in the face of the insurgent onslaught, NATO airstrikes and uprisings in neighborhoods across Tripoli.