A common argument against compulsory licensing of intellectual property maintains that it facilitates the entry of inefficient producers, which may reduce social welfare independently of any effects on R&D incentives. We study the issue in a model where the innovative firm, under the threat of compulsory licensing, react strategically by choosing between quantity and price competition. We show that the risk of a reduction in static welfare due to the entry of highly inefficient firms is avoided if licensing entails a royalty per unit of output and zero fixed fee. The rationale behind this result lies in the fact that compulsory licensing threat works as a disciplining device to improve static social welfare, even when the applicant is a high cost inefficient firm.