We study market-based regulation in a polluting industry that produces two externalities at the same time. There is a negative externality (emissions) to which every firm in the industry contributes, and a positive externality (technological spillover), so that an additional application of green technology becomes easier as the number of appliers increases. An optimal policy is shown to consist of a uniform emission price across polluting firms and a subsidy to early users of green technology. We also show that the presence of the second externality strongly affects the instrument choice under uncertainty between taxes and tradable permits, and that the influence depends on the design of the instruments. More specifically, it depends on whether early users of green technology are subsidized or not.