Empirical evidence shows that countries with larger public sectors also have larger trade shares and a larger share of firms that export. These links between the public and the private sector are reconciled in an analytically tractable general equilibrium model allowing for a two-way causal relation between size (and the composition) of the public sector and openness and industry structure of the private sector. First, a larger public sector or a larger share of public expenditure used for public employment (alternative to transfers) results in a more open private sector (trade share and fraction of firms exporting), and it is also associated with more fat-tailedness of the firm size distribution, higher average productivity, lower average unit labour costs, and better wage competitiveness and terms of trade. These outcomes are driven by endogenous entry and selection of firms. Second, for optimal fiscal policies, international spillovers imply that non-cooperative policies have an upward bias in the overall size of the public sector, but a downward bias in transfers as a share of public expenditures. Trade liberalization and the degree of firm heterogeneity magnify these biases and thereby influence the size and structure of public expenditures.