Jami` at-Tirmidhi Book 17, Hadith 21
that Aby Bakr lashed and banished, and that 'Umar lashed and banished.
That the Messenger of Allah (ﷺ) lashed and banished, Abu Bakr lashed and banished, and 'Umar lashed and banished.
"We were with the Prophet (ﷺ) partners with Allah, and that you will not steal nor commit adultery.' He recited to them the Ayah. (And he said:)'Whoever among you dies, then this reward is with Allah, and whoever among you does some of this and then he is punished, it is atonement for him. And whoever does some of this and Allah covers it for him, then it is up to Allah; if He wills, He will punish them, and if He wills, He will forgive him.'"