Sarajevo was in Austria-Hungary.
What would President Trump do if told he mustn't enter any blue states. He'd say, "An American President has a right to go anywhere in America. I will not surrender to terrorists.
Yes, that was exactly the situation in which the Crown Prince had found himself.
And he was probably quite popular with the locals in Sarajevo: after the murder, the killers would almost have been lynched by the livid crowd, as the police report stated.