The spirit that was speaking to them was not divine. It was supernatural though. The people submitted to it because they did not put the prophet to the test to see whether or not his teaching was in harmony with what had already been revealed through God's messenger Moses.
God blames the plight of the nation on the false prophets who were listened to. What did they do? They lulled the people into complacency, which led them to believe that all was well when it was not well. They preached to them smooth things because the people had itching ears. They liked the things that were taught to them, but it was not the Word of God. God says they were lies given in His name. If one listens to them, then it is the same thing as the blind leading the blind and they both fall in the ditch.