This seems a very odd outcome. After all the supposed changes post-9/11, I would think an international flight crew would need to be known to the destination and have entry clearance just to operate the flight.
Why not let the plane land, fine the airline, and detain the pilot in the airport until he can be flown back, instead of wasting hours of time of hundreds of people?