PurposeThis study investigates the relationships between service quality, relationship quality (i.e. satisfaction, trust and commitment) and loyalty in the business-to-business (B2B) context.Design/methodology/approachA questionnaire was developed from a comprehensive literature review. It was verified by experts and statistical techniques. The data were collected from senior purchasing officers in 232 electrical and electronics companies in Thailand. Path analysis of structural equation modeling was used to analyze the hypothesized model.FindingsIt was found that service quality has a significant positive direct effect on satisfaction, trust and commitment. Commitment significantly affects loyalty, while service quality, satisfaction and trust do not.Originality/valueThis is one of the first examples of empirical research to examine the links between service quality, components of relationship quality and loyalty in the B2B electrical and electronics context.