We present evidence on whether workers have social preferences by comparing workers' productivity under relative incentives, where individual effort imposes a negative externality on others, to their productivity under piece rates, where it does not. We find that the productivity of the average worker is at least 50 percent higher under piece rates than under relative incentives. We show that this is due to workers partially internalizing the negative externality their effort imposes on others under relative incentives, especially when working alongside their friends. Under piece rates, the relationship among workers does not affect productivity. Further analysis reveals that workers internalize the externality only when they can monitor others and be monitored. This rules out pure altruism as the underlying motive of workers' behavior.