In this article, we introduce a simple distributed algorithm that assigns appropriate individual transmission powers to devices in a wireless ad hoc network. In contrast to many other proposed algorithms, it does without special hardware. It requires only local neighbourhood information and therefore avoids flooding information throughout the network. Finally, the cooperative nature of the algorithm avoids that devices cause excessive interference by using unnecessarily high transmission powers. By means of simulation, we show that the topologies created by this algorithm without any global knowledge are as effective as topologies resulting from a good choice of a common transmission power (which would require global knowledge) in terms of the achievable throughput.