Al-Bara’ reported God’s Messenger as saying, “If anyone sacrifices before the prayer, he is sacrificing only for himself; but if anyone sacrifices after the prayer, his rites are complete and he has correctly followed the practice of the Muslims."
(Bukhari and Muslim.)