Fighting between rival groups began on Monday night in Tripoli, and ended after the release of a commander on Tuesday.