This paper analyses the emergence of the informal economy in the environment characterised by non-competitive labour markets with wage bargaining. We develop a simple extension of the standard search model a la Pissarides (2000) with formal and informal sectors to show how a government's auditing of informal firms and barriers to firms' entry erected in the formal sector by corrupt bureaucracy can make for stable coexistence of formal and informal jobs in the long term. In equilibrium, wage differentials for homogeneous and risk-neutral workers emerge because different types of jobs have different lifetimes and/or have different creation costs. The former are explained by the auditing activities of the government that in the simple set-up destroy informal matches, while keeping formal jobs intact; the latter are due to varying capital costs, or costs associated with red tape and bureaucratic extortion (bribing). Search frictions introduce rent sharing between firms and workers in both formal and informal sectors. This has an important implication for policy making. In particular, we show that if ceteris paribus a firms' bargaining position vis-a-vis workers is stronger in the formal rather than in the informal sector, governments can afford to appropriate a larger part of a productive match surplus (e.g. by levying higher taxes), without endangering the qualitative outcome in the long run. Rent sharing also implies that both formal and informal sector employees may receive wages above marginal product. We investigate efficiency properties of an equilibrium with formal and informal jobs and discuss the role of the government in creating and eliminating such inefficiencies partially arising from a version of the hold-up problem (Grout, 1984). Some lessons are drawn for normative analyses of policies aimed at reduction of informality in set-ups with non-competitive labour markets. In particular, the conditions are given under which a reduction in size of the informal sector is likely to be detrimental for economic welfare.