Sahih Bukhari, Volume 9, Book 92, Number 387:
Narrated Abu Musa:

The Prophet said, “My example and the example of what I have been sent with is that of a man who came to some people and said, ‘O people! I have seen the enemy’s army with my own eyes, and I am the naked warner; so protect yourselves!’ Then a group of his people obeyed him and fled at night proceeding stealthily till they were safe, while another group of them disbelieved him and stayed at their places till morning when the army came upon them, and killed and ruined them completely So this is the example of that person who obeys me and follows what I have brought (the Quran and the Sunna), and the example of the one who disobeys me and disbelieves the truth I have brought.”