Guest-worker programs have been providing rapidly growing economies with millions of temporary foreign workers over the last couple of decades. With the duration of stay strictly limited by program rules in most of the host countries and wages paid to guest workers often set at sub-market levels, many of the migrants choose to overstay and seek employment in the underground economy. This paper develops a general-equilibrium model that relates the flow of guest workers transiting to the underground economy to the rules of the program, enforcement measures of the host country and market conditions facing migrants at home and abroad