We study the impact of team-based performance pay in a major UK government agency, the public employment service. The scheme covered quantity and quality targets, measured with varying degrees of precision. We use unique data from the agency's performance management system and personnel records, linked to local labour market data. We show that on average the scheme had no significant effect but had a substantial positive effect in small teams, fitting an explanation combining free riding and peer monitoring. The impact was greater on better-measured quantity outcomes than quality outcomes. The scheme was very cost effective in small offices.