Ibn Abbas said to me and to his son Ali, "Go to Abu Saeed and listen to what he has to say."So we set off, and we found him tending to a garden of his. He took his cloak and wrapped it around himself, sitting with his knees drawn up. Then he began to speak to us until he came to mention the building of the mosque. He said, "We used to carry the bricks one at a time, while Ammar carried two at a time. The Prophet ﷺ saw him and began to dust the dirt off him, saying, 'Alas for Ammar! The transgressing party will kill him. He calls them to Paradise, and they call him to the Fire.'"He said, "Ammar would say, 'I seek refuge in Allah from trials.'"
قال لي ابن عباس ولابنه علي: انطلقا إلى أبي سعيد فاسمعا من حديثه. فانطلقنا فإذا هو في حائط يصلحه، فأخذ رداءه فاحتبي. ثم أنشأ يحدثنا حتى أتى على ذكر بناء المسجد فقال: كنا نحمل لبنة لبنة وعمار لبنتين لبنتين فرآه النبي ﷺ فينفض التراب عنه. ويقول: ويح عمار تقتله الفئة الباغية يدعوهم إلى الجنة، ويدعونه إلى النار. قال: يقول عمار: أعوذ بالله من الفتن.
Bukhari narrated it in "Prayer" (447), from Musaddad, from Abdul-Aziz bin Mukhtar, who said, Khalid Haddan narrated to us, from Ikrima, and he mentioned something similar.He also narrated it in "Jihad and Expeditions" (2812), from Ibrahim bin Musa, Abdul-Wahhab informed us, Khalid narrated it to us with the same chain, and in it,"He wiped the dust from his head and said, 'Woe to Ammar, a transgressing faction will kill him. Ammar calls them to Allah, and they call him to the Fire.'"But Muslim narrated it in "Tribulations" (2915) through another route, from Abu Nadra, narrating from Abu Saeed Khudri, and in it, he said to Ammar, when he began digging the trench, and began wiping his head and saying, "Poor son of Sumayyah, a transgressing faction will kill you."Bayhaqi, in Dalail (2/549), took the mention of the trench in the narration of Abu Nadra to be an error, or suggested that he said it at the building of the masjid, and then said it again on the day of the trench.I say, the detailed discussion of that will come in the book on the virtues of the companions, and there is nothing preventing the second view from being the sahih one, for it is established from a number of companions that he also said it on the day of the trench.What is being cited as evidence here is cooperation in building the masjid of the Messenger of Allah ﷺ.Ammar was among those who doubled their effort in building the masjid of the Messenger of Allah ﷺ, so he would carry two bricks at a time, while others carried one brick at a time.