The effect of intra-firm pay dispersion on work performance is controversial and the empirical evidence is mixed. High pay dispersion may act as an extra incentive for employees' effort or it may reduce motivation and team cohesiveness. These effects can also coexist and the prevalence of one effect over the other may depend on the use of different definitions of what constitutes a "team." For this paper we collected a unique dataset from the men's major soccer league in Italy. For each match we computed the exact pay dispersion of each work team and estimated its effect on team performance. Our results show that when the work team is considered to consist of only the players who contribute to the result, high pay dispersion has a detrimental impact on team performance. Several robustness checks confirm this result. In addition, we show that enlarging the definition of work team causes this effect to disappear or even become positive. Finally, we find that the detrimental effect of pay dispersion is due to worst individual performance, rather than a reduction of team cooperation.