Abdullah bin Umar reported,

Whenever the Prophet ﷺ prayed on the day of Eid or any other day, a spear would be planted in front of him, and he would pray facing it while the people stood behind him.Nafi said, "It is from this practice that the rulers adopted the custom."

Ibn Majah 1305

Sahih

حدثنا سويد بن سعيد حدثنا علي بن مسهر عن عبيد الله عن نافع

عن ابن عمر قال

كان النبي ﷺ إذا صلى يوم عيد أو غيره نصبت الحربة بين يديه فيصلي إليها والناس من خلفه قال نافع فمن ثم اتخذها الأمراء

ابن ماجه 1305صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Establishing prayer and the sunnah regarding it
Chapter
Spear on Eid day
Numbering
Darussalam 1305
Ibn Majah 1305