Warring tribes in northwest Pakistan agree to a cease-fire after bloodshed