National governments can only tax the economic activity they either directly observe or that is reported by municipal authorities. In this paper we investigate how illegal mining, a very common phenomenon in Colombia, changed with a tax reform that reduced the share of revenue transferred back to mining municipalities. To overcome the challenge of measuring illegal activity, we construct a novel dataset using machine learning predictions on satellite imagery features. Theoretically we expect illegal mining to increase because the amount required to bribe the local authority is smaller after the reform. Using a difference-in-differences strategy, with Peru as the control, we find that illegal mining increased by 4.47 percentage points as share of the mining area. In addition, we provide suggestive evidence that illegal mines have more harmful health effects on the surrounding population than legal mines. These results illustrate unintended effects of tax revenue redistribution.