Even for the legendary Roger Federer, this was — nearly — unbelievable.