What he said while they were carrying bricks
ʿAmmar was helping build the mosque when it was said.
وَيْحَ عَمَّارٍ تَقْتُلُهُ الْفِئَةُ الْبَاغِيَةُ، يَدْعُوهُمْ إِلَى الْجَنَّةِ، وَيَدْعُونَهُ إِلَى النَّارِ
Wayḥa ʿAmmār, taqtuluhu-l-fiʾatu-l-bāghiyah, yadʿūhum ilā-l-jannah wa yadʿūnahu ilā-n-nār
“Alas for ʿAmmar. The transgressing party will kill him. He calls them to the Garden and they call him to the Fire.”
Where this comes from
ʿAmmar was carrying two bricks for every one the others carried. He was killed decades later, and the companions who were present recognised the words when it happened.
The full narration
Narrated `Ikrima:Ibn `Abbas said to me and to his son `Ali, "Go to Abu Sa`id and listen to what he narrates." So we went and found him in a garden looking after it. He picked up his Rida', wore it and sat down and started narrating till the topic of the construction of the mosque reached. He said, "We were carrying one adobe at a time while `Ammar was carrying two. The Prophet (ﷺ) saw him and started removing the dust from his body and said, "May Allah be Merciful to `Ammar. He will be inviting them (i.e. his murderers, the rebellious group) to Paradise and they will invite him to Hell-fire." `Ammar said, "I seek refuge with Allah from affliction
Source
Ṣaḥīḥ al-Bukhārī · 447
- Agreed upon as authentic (al-Bukhārī / Muslim)