However...
==> Your rights at the border. Compared to people and police in the interior of the country, border agents have more power and people crossing the border have less privacy. But the border is not a Constitution-free zone. The powers of border agents are tempered by the First Amendment (freedom of speech, association, press, and religion), the Fourth Amendment (freedom from unreasonable searches and seizures), the Fifth Amendment (freedom from compelled self-incrimination), and the Fourteenth Amendment (freedom from discrimination).
but the agents do have the right to mitigate security/criminal threats.
[===>] https://www.eff.org/wp/digital-privacy-us-border-2017
"Where were you on the night of the killing?"
"..."
Prosecution could well use your initial refusal to answer this question to aid their case in court, even if you then provide some answer within court.
I am very unfamiliar with American law concerning these matters, so I'm not sure how much of a divide there is between America and the UK when it comes to this.