A guest-worker program provides an appealing way of addressing labor shortages in an advanced country. It requires, however, that foreign workers are willing to return home when their work permit expires. I examine how immigration policies, enforcement measures, and opportunities available in various markets at home and abroad affect the behavior of program participants. Welfare of a migrant who obeys the rules of the program is compared with that of workers who choose other options in order to define the conditions under which temporary migration is attractive to potential migrants and at the same time consistent with voluntary return.