Yes, this reminds me of the time I flew with my wife to Brazil, but the travel agent who had made the booking failed to realize that our visas were set to expire the day before we arrived.
Luckily, we were able to pull some strings to get in (connections sure come in handy sometimes), but I was ready to call my lawyer to initiate action against the travel agent during those 4 hours before we were allowed to leave the airport.