One version of Donald Trump's proposed immigration policies involves banning Muslim immigration from the USA:
One of Trump's most controversial proposals was his original plan for a "total and complete" temporary ban on foreign Muslims entering the United States. Trump later changed his position by stating that the temporary ban would apply only to people originating from countries with a "proven history of terrorism against the United States or its allies", or countries "compromised by terrorism".
In Australian politics, we have a similar call from Senator Pauline Hanson:
After the 2016 Orlando nightclub shooting, Hanson posted a video on her Facebook page calling for a ban on Muslim immigration to Australia.
How could this be implemented?
Trump... has suggested that customs agents ask, "Are you a Muslim?" and turn away those who say yes. -- NewsMax
Which leads me to my question:
Question: In the context of Muslim immigration bans, it would be desirable for a Muslim to momentarily deny being a Muslim. If a Muslim is asked "are you a Muslim" should they nevertheless say "yes"?
I'd guess terrorists would have no qualms about lying to get through immigration. But what about the good Muslims? I personally would be unwilling to lie. Playing a role are:
Taqiya, which Wikipedia describes as "denial of religious belief and practice in the face of persecution":
Whoever disbelieves in Allah after his belief... except for one who is forced [to renounce his religion] while his heart is secure in faith. But those who [willingly] open their breasts to disbelief, upon them is wrath from Allah, and for them is a great punishment -- Qur'an 16:106
While negatives, being denied entry into the USA or Australia arguably does not seem sufficient to consider it as being "forced". So, by this logic, a Muslim should say "yes" and accept they're literally "going back to where they came from".
In fact, it may be that responding "no" could be interpreted as apostasy, although they could repent after getting through immigration. (And, technically, immigration wouldn't be letting in Muslims.)
The Qur'an forbids (or, at least, strongly discourages) lying:
Then whoever argues with you about it after [this] knowledge has come to you - say, "Come, let us call our sons and your sons, our women and your women, ourselves and yourselves, then supplicate earnestly [together] and invoke the curse of Allah upon the liars [among us]." -- Qur'an 3:61
Unquestionably, for Allah is the pure religion. And those who take protectors besides Him [say], "We only worship them that they may bring us nearer to Allah in position." Indeed, Allah will judge between them concerning that over which they differ. Indeed, Allah does not guide he who is a liar and [confirmed] disbeliever. -- Qur'an 39:3