BackgroundGrowing evidence suggests that female physicians tend to deliver health services of higher quality than their male counterparts. We aimed to revisit the issue of gender disparities in health-care quality in a typical primary care setting. MethodsIn our audit study, both male and female standardised patients (SPs) recruited from the local community and trained to present consistent cases of illness (unstable angina and asthma) were randomly assigned by computer generation to male and female primary health-care providers of community health centres (CHCs) in urban Xi'an, China. Written consent was obtained from clinicians and the hospital director 3 months before the SP visits. Data were anonymised when analysed. We estimated linear regression models to compare clinical practice and outcomes (including clinical process, assessment of treatment, service time, health expenditure, and physician–patient relationship) by physician gender and by physician–patient gender match after controlling for provider characteristics, and series of fixed effects. Ethics approval was obtained by the Ethics Committee of Xi'an Jiaotong University Health Science Center. FindingsIn Aug 17–28, 2017, and July 30 to Aug 10, 2018, there were 492 interactions between 243 physicians and 12 SPs in 63 CHCs. We found little difference by physician gender. However, our results suggest a salient difference by patient gender, which was driven by a physician–patient gender match. Compared with female patients with female physicians, male patients with female physicians were prescribed 0·586 more items of invasive tests (p=0·003) and 0·623 more items of unnecessary tests (p=0·008). However, male patients were prescribed 0·299 less items of unnecessary drugs (p=0·026). Importantly, the interactions of male patients with female physicians came with a 23·0% higher correct diagnosis (p=0·008), and a 19·4% higher correct drug treatment (p=0·029) than for female patients with female physicians. Male patients had a 14·93 China Yuan higher clinical tests expense (p=0·008) and a 2·040 higher score in the measure of patient-centred communication (p=0·052). InterpretationThese findings might help to explain the gap in quality of care received by male and female patients, a form of health-care inequity and potential discrimination that has to be addressed. FundingThe National Natural Science Foundation of China (71874137), Shaanxi Social Science Foundation (2017S024), Shaanxi Soft Science (2015KRM117), Shaanxi Provincial Youth Star of Science and Technology in 2016, Xi'an Jiaotong University (SK2015007), Top-notch Young Professionals of China and China Medical Board (15-227), China Scholarship Council (201706280307; 201806280021), the US PEPPER Center Scholar Award (P30AG021342), and National Institutes of Health (R03AG048920; K01AG053408).