Mishkat al-Masabih

Mishkat al-Masabih 1149

The manner in which one who is led in prayer by an Imam must follow him, and the rule applying to the one who is preceded by him - Section 3
Arabic hadith text
وَعنهُ قَالَ: الَّذِي يَرْفَعُ رَأْسَهُ وَيَخْفِضُهُ قَبْلَ الْإِمَامِ فَإِنَّمَا ناصيته بيد الشَّيْطَان ". رَوَاهُ مَالك
Translation
He said

If anyone raises and lowers his head before the imam, his forelock is in the devil’s hand. Malik transmitted it.