According to army regulations, he was supposed to be executed, but Zhang, instead, allegedly sent him to the capital, Chang 'an, and, while recommending execution, was hoping that Emperor Xuanzong would pardon An.
He was supposed to be executed. This was according to army regulations. Zhang allegedly sent him to the capital. This was instead. Emperor Xuanzong would pardon An. This was what Zhang was hoping. This was instead. Chang 'an was the capital.