Sure Ash-Shu'araa

26:29

قَالَ لَئِنِ ٱتَّخَذْتَ إِلَٰهًا غَيْرِى لَأَجْعَلَنَّكَ مِنَ ٱلْمَسْجُونِينَ

Er (Fir'aun) sagte: "Wenn du dir einen anderen Gott als mich nimmst, werde ich dich ganz gewiß zu einem der Gefangenen machen."

Tafsir 26:29

Pharaoh said to Moses after becoming unable to argue with him: If you worship any god other than Me, I will throw you into prison.