Anyway, a citizen being turned away, shipped back, or put into deportation at the airport isn’t a far reach from any of this.
Where would you even try to deport a US citizen? "Here, Spain, we don't think this guy is a US citizen, his passport doesn't look legit enough, can you take him?"
An incomplete wikipedia list with a number of citizens that were wrongfully deported from the U.S.: https://en.wikipedia.org/wiki/Deportation_of_Americans_from_...
U.S. citizens having deportation detainers placed on them is suprisingly common: https://www.cato.org/publications/immigration-research-polic...
This guy was held for weeks: https://www.washingtonpost.com/nation/2018/12/04/born-philad...
U.S. citizen detained without charge for a year and then freed: https://www.aclu.org/blog/national-security/detention/us-cit...
There are dozens of stories like these. I've listed a few, but to go further I'd recommend doing a web search.
Also, you’re already across once you meet the border people. You’re not in no-man’s-land; the border is infinitely thin and you are already in the US at the checkpoint. This is the simplest habeas corpus petition ever.