What determines whether a temporary migrant chooses to go abroad as a documented worker or as an illegal alien? We address the question from a theoretical perspective by focusing on how immigration policies, aimed at both documented and undocumented foreign workers, influence the choice between the two modes of migration. Calibrating our model to the specific case of temporary emigration from Thailand, we provide estimates of the relative policy effectiveness. The deportation rate facing undocumented aliens is shown to be the most potent instrument, while some of the measures directed at documented contract workers are found to be more effective in influencing the choice of emigration mode than border controls and employer sanctions aimed at illegal immigrants.