O ye who believe! If ye obey the Unbelievers, they will drive you back on your heels, and ye will turn back to your own loss. Qur'an 3:149
O ye who believe! Obey Allah, and obey the Messenger, and those charged with authority among you. If ye differ in anything among yourselves, refer it to Allah and His Messenger, if ye do believe in Allah and the Last Day: that is best, and most suitable for final determination. Qur'an 4:59
A (declaration) of immunity from Allah and His Messenger to those of the Pagans with whom ye have contracted mutual alliance … and an announcement from Allah and His Messenger to the people on the day of the Great Pilgrimage, that Allah and His Messenger dissolve obligations with the Pagans. … Qur'an 9:1,3
(But the treaties are) not dissolved with those Pagans with whom ye have entered into alliance and who have not subsequently failed you in aught, nor aided anyone against you. So fulfil your engagements with them to the end of their term: for Allah loveth the righteous. Qur'an 9:4
But if they violate their oaths after their covenant, and attack your Faith, fight ye the chiefs of Unfaith: for their oaths are nothing to them: that thus they may be restrained. Qur'an 9:12
We have enjoined on man kindness to parents: but if they strive thee to join with Me anything of which thou hast no knowledge, obey them not. Ye have to return to Me, and I will tell you of all that ye did. Qur'an 29:8
They say: ‘We believe in Allah and in the Messenger, and we obey'; but even after that, some of them turn away: they are not believers. When they are summoned to Allah and His Messenger, in order that he may judge between them, behold, some of them decline. But if the right is on their side, they come to him with all submission. Qur'an 24:47,48
The answer of the Believers, when summoned to Allah and His Messenger, in order that he may judge between them, is no other than this: they say ‘We hear and we obey': it is such as obey Allah and His Messenger, and fear Allah and do right that will triumph. They swear their strongest oaths by Allah that, if only thou wouldst command them, they would leave, say: ‘Swear ye not; obedience is reasonable; verily, Allah is well acquainted with all that ye do.’ Say: ‘Obey Allah and obey the Messenger: but if ye turn away, he is only responsible for the duty placed on him and ye for that placed on you. If ye obey him, ye shall be on right guidance. The Messenger’s duty is only to preach the clear. Qur'an 24:51-54
O ye who believe! Take not My enemies and yours as friends, offering them love, even though they have rejected the Truth that has come to you, and have driven out the Messenger and yourselves because ye believe in Allah and your Lord! If ye have come out to strive in My Way and to seek My Good Pleasure, showing friendship unto them in secret: for I know full well all that ye reveal. And any of you that does this hast strayed from the Straight Path. Qúr'an 60:1
It may be that Allah will establish friendship between you and those whom ye hold as enemies. For Allah has power; and Allah is Oft-Forgiving, Most Merciful. Allah forbids you not, with regard to those who fight you not for Faith nor drive you out of your homes, from dealing kindly and justly with them: for Allah loveth those who are just. Allah only forbids you, with regard to those who fight you for Faith, and drive you out of your homes, and support in driving you out, from turning to them it is such as turn to them that do wrong. Qur'an 60:7-9
These are the basics of a topic that has spiritual, but also political and legal aspects, the last both in a civil and a criminal sense: obedience as part of Islam. As already said earlier, the Qur’an states that there is no compulsion in religion in verse 2:255. However, those who are willing to follow the Book’s and the Prophet’s rulings, show that they take their faith to the next level, that of practice. There are two dimensions here: The personal and the social. On the personal and spiritual level that may be invisible to others, obedience is compulsory to the believer. No believer without personal worship. Allah sees and judges us; real believers don’t defy His authority over creation including themselves. Allah swt rewards us for our obedience towards Him and His Messenger. Some very primary examples of personal worship are prayer and remembrance of Allah swt.
On the bigger level that is social interaction, the faithful may have to do concessions. If a believer enters any agreement with another person, he or she has to live up to it. A believer has to make sure that any agreement with someone else is not damaging to himself or someone else, either morally or physically. In this respect it does not matter what credentials the other party has. If the other party breaks the contract, the believer may take action against the other party. And obedience to those who persecute us violently, is forbidden to a believer. Persecution and violence without just cause are acts of disbelief anyway, and it is allowed to disobey rulers who persecute us physically. The first step believers should take in such case, is leaving the place where they are persecuted. After that, they have been granted the right to defend themselves physically. As long as relations between people are safe and friendly, it is obligatory to obey leaders, even if they have another creed than ours.