This paper deals with the optimal behaviour of a single public firm in an oligopolistic market where there are also n private firms. The public firm aims at maximizing a social welfare function depending on producers' and consumers' surplus. In section 3 it is shown that there exists an optimal strategy for the public firm when it is Stackelberg leader. When, instead, the public firm has no move advantage and the game follows Cournot-Nash rules, we show that the outcome is generically Pareto-inefficient. These two regimes are then compared with two extreme cases: a nationalized industry and a pure oligopoly (all firms maximize profit) in the example provided in section 5, where the equilibria considered in the previous sections are fully characterized. Amongst other results, one seems rather paradoxical: when the number of firms is sufficiently large, the optimal strategy of a welfare maximizing firm is to act as if it wanted to maximize its profit.