Egypt military says sorry as truce agreed