Quran has described three groups -one who have embraced Quran as their ideology & are leading their lives under Quranocracy are declared as Momineen who are nowhere available in the entire globe at present while those who reject & oppose Quranic Order are termed as kafiroon while the third group is of Munafiqeen who declare verbally but leading a secular life opposite to Quran ie this group is the entire Muslim community of the present day.(2:8 )
Ayah 3:27 refers to those Muslims who are leading their lives under a Quranic Govt which has been disappeared since 1200 years & has nothing to do with the present munafiqeen being this entire ummah ." As both the groups ,kafiroon & Momineen differ in their ideologies ,it is obvious that Mominoon can't become friends or allies to kafiroon rather they will have momineen as their friends & allies .Remember ! whoever take kafiroon as their friends or allies ,will have nothing to do with Allah (3/117-119 , 58/22 ,60/4 ) .Illa overhere means "balkah in Urdu ( Nevertheless ) "-Suyuti Al- Itqan -
Nevertheless you should be very careful in taking all preventive measures for defence against all dangers & also keep in mind that actions of every body are controlled by Divinity & that is the final destination of every doer .