WJA699-possible divert to foriegn airport

It would seem logical that customs would demand the passengers stay on board on the aircraft. Perhaps they would give those with passports the ability to disembark but I don’t it.