Let not believers take disbelievers as allies [i.e., supporters or protectors] rather than believers. And whoever [of you] does that has nothing [i.e., no association] with Allāh, except when taking precaution against them in prudence.1 And Allāh warns you of Himself, and to Allāh is the [final] destination.
Translation: Saheeh International (English)
1 When fearing harm from an enemy, the believer may pretend as long as his heart and intention are not affected.
O believers, do not take disbelievers as friends that you love and support instead of other believers: whoever does this will never be helped by Allah in any way. However, if you are under their authority and you fear for your lives, then there is no harm if you avoid their harm by being nice to them in your speech and actions on the outside, whilst hating them inside. Allah warns you of Himself, so fear Him and do not become the subject of His anger by committing sins. All men will return to Allah alone on the Day of Resurrection for Him to reward them for their actions.