Objective: To examine whether the quality of primary care measured by the 2004 contract varies with socioeconomic deprivation. Design: Retrospective analysis of publicly available data, comparing quality indicators used for payment that allow exclusion of patients (payment quality) and indicators based on the care delivered to all patients (delivered quality). Setting and participants: 1024 general practices in Scotland. Main outcome measures: Regression coefficients summarising the relationships between deprivation and payment and delivered quality. Results: Little systematic association is found between payment quality and deprivation but, for 17 of the 33 indicators examined, delivered quality falls with increasing deprivation. Absolute differences in delivered quality are small for most simpler process measures, such as recording of smoking status or blood pressure. Greater inequalities are seen for more complex process measures such as diagnostic procedures, some intermediate outcome measures such as glycaemic control in diabetes and measures of treatment such as influenza immunisation. Conclusions: The exclusions system succeeds in not penalising practices financially for the characteristics of the population they serve, but does not reward the additional work required in deprived areas and contributes to a continuation of the inverse care law. The contract data collected prevent examination of most complex process or treatment measures and this analysis is likely to underestimate the extent of continuing inequalities in care. Broader lessons cannot be drawn on the effect on inequalities of this new set of incentives until changes are made to the way contract data are collected and analysed.