We model the invention of new technologies and their diffusion across countries. In our model all countries grow at the same steady-state rate, with each country's productivity ranking determined by how rapidly it adopts ideas. Research effort is determined by how much ideas earn at home and abroad. Patents affect the return to ideas. We relate the decision to patent an invention internationally to the cost of patenting in a country and to the expected value of patent protection in that country. We can thus infer the direction and magnitude of the international diffusion of technology from data on international patenting, productivity, and research. We fit the model to data from the five leading research economies. A rough summary of our findings is that the world lies about two-thirds of the way from an extreme of technological autarky to an extreme of free trade in ideas. Research performed abroad is about two-thirds as potent as domestic research. Together the United States and Japan drive at least two-thirds of the growth in each of the countries in our sample.