The pilots of the plane would be in constant contact with the nearest airport during and right after take-off, especially when there are technical problems.
It's not hard to imagine the conversation would involve like:-
PILOT: One of the engines has failed catastrophically, we need to make an emergency landing, can you clear the runway back in Tehran or is there another airport we can go to?