Harmalah (may Allah have mercy on him) says: I heard Imam al-Shafi'i (may Allah have mercy on him) say, regarding the saying of the Prophet (peace and blessings be upon him): "Stipulate the wala' for them," that its meaning is: Stipulate the wala' against them. Allah, the Mighty and Majestic, said: "For them is the curse" [Surah al-Ra'd: 25], meaning: upon them is the curse.
The first answer is more correct, and the authenticity of this wording is open to question. And Allah knows best.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب المكاتب / 21739