Was Muhammad a law maker besides God?

Those who follow the messenger, the gentile Prophet (Muhammad) whom they find written down in the
Torah and Injeel
that is with them. He enjoins them to be righteous and forbids them from evil. He
makes lawful for them
good things, and prohibits for them what is bad, and he relieves them
from the heavy burden and the shackles which were upon them.

7:157

Traditional Muslims claim that Prophet Muhammad was a law maker in his own right, with the authority to authorise good things and prohibit bad things. They cite the above verse in support of their claim.

It can be shown that this interpretation of 7:157 is inaccurate and is intended to proclaim Prophet Muhammad as a law maker in his own right besides God!

If we study 7:157 in isolation, it may well seem that the Prophet is spoken of as a law maker, however, if we study all the related verses together, the picture becomes totally different.

To study 7:157 we must also study 6:114 and 66:1.

Shall I seek other than God as a law maker when He has brought down to you the Book fully detailed? 6:114

The message in 6:114 clearly stands out; God is the only law maker. Thus any messenger of God can only prohibit what is prohibited in the book of God, and make lawful what God made lawful. The only duty of the messenger of God is to deliver God's message, but not to be a law maker besides God:

The sole duty of the messenger is the delivery (of God's message) and God knows what you reveal and what you conceal. 5:99

In addition, in 66:1 we read how God reprimanded Prophet Muhammad for once prohibiting an item that was not prohibited by God.

O you Prophet, why do you prohibit what God has made lawful for you, seeking to please your wives? God is Forgiver, Merciful. 66:1

This verse in particular makes this issue beyond dispute for all who take God's words in the Quran seriously: the Prophet does not have the authority to prohibit except what is prohibited by God.

We conclude from the above verses the correct meaning of 7:157. Any messenger of God can only invite his people to do righteous acts, instructs them away from evil and prohibits them from bad things, all in accordance with God's law and God's Book.