The ceasefire deal was struck by a Pakistani government team after days of clashes between rival sectarian groups Armed Shia and Sunni Muslims.