Contextual advertising entails the display of relevant ads based on the content that consumers view, exploiting the potential that consumers' content preferences are indicative of their product preferences. This paper studies the strategic aspects of such advertising, considering an intermediary who has access to a content base, sells advertising space to advertisers who compete in the product market, and provides the targeting technology. The results show that contextual targeting impacts advertiser profit in two ways: First, advertising through relevant content topics helps advertisers reach consumers with a strong preference for their product. Second, heterogeneity in consumers' content preferences can be leveraged to reduce product market competition, especially when competition is intense. The intermediary has incentives to strategically design its targeting technology, sometimes at the cost of the advertisers. When product market competition is moderate, the intermediary offers accurate targeting such that the consumers see the most relevant ads. When competition is high, the intermediary lowers the targeting accuracy such that the consumers see less relevant ads. Doing so intensifies competition and encourages advertisers to bid for multiple content topics in order to prevent their competitors from reaching consumers. In some cases, this may lead to an asymmetric equilibrium where one advertiser bids high even for the content topic that is more relevant to its competitor. © 2012 INFORMS.