Using first principles calculations, we investigate the structural and electronic properties of 3d transition metal doped SnO. We examine the stability of different doping sites using formation energy calculations. The magnetic behavior of the dopant atoms is found to be complex because of interplay between strong structural relaxation, spin-lattice coupling, and crystal field splitting. The interaction between dopant atoms is analyzed as a function of their separation, showing that clustering typically counteracts spin polarization. An exception is found for V doping, which thus turns out to be a promising candidate for realizing a magnetic p-type oxide.