Ibrahim said: When a man prays alone and then prays in congregation, the obligatory prayer is the one he performed first.