The difference between a miracle of a prophet and a karaamah, a supernatural event of other than a prophet

How can we distinguish between a miracle and karaamah? What is the wisdom behind allowing karaamah to take place for some of Allaah’s slaves and not others?

A miracle, which is something that that defies natural laws, is the same as a karaamah, but a miracle is connected to a claim of prophethood, whereas a karaamah is not. So, miracles are for prophets while karaamahs are from the righteous allies of Allaah. The wisdom of allowing miracles is that the people of the prophet believe in him. Likewise, the wisdom of karaamahs is so that people accept his speech, and it can be a gradual process too. The point of all this is, is that a person should not rely on this and leave what he has been ordered to do and claim that he has reached the level of karaamah as some of those ascribe themselves to worship do. Such a thing should not be relied upon, because it may go from being a karaamah and end up being a trail and a test. So, if a person is upon the straight path, and he is not affected by this, then without doubt it shows his virtues, and these miracles will support him when he calls people and shows them the way to guidance. There are no time restrictions to karaamahs, and they will continue to happen for the righteous until the Day of Resurrection.