Illegal immigrants were employed as cleaners in the Home Office department responsible for kicking them out of the country.
The five Nigerians were caught as they turned up for work at the Immigration and Nationality Directorate office in London.
They are now in detention pending deportation.
The farcical revelation left the Home Office reeling last night. While Home Secretary John Reid brazened out the storm by saying apprehension of the five was a sign that security checks were working, the timing could not have been worse.