Market orientation is a way for companies to focus on customers so that customers continue to buy company products. Agility is an important ability of a company to increase a sustainable competitive advantage. This study was conducted based on the decline in batik sales in Pekalongan and the existence of a research gap on the relationship between market orientation and marketing performance. This paper aims to test empirically the mediating effect of agility on the relationship between market orientation and marketing performance. Data were collected from 190 SMEs in Pekalongan. The result shows that market orientation significantly affects agility and marketing performance, and agility significantly affects marketing performance. Furthermore, agility mediates the correlation between market orientation and marketing performance. The Marketing performance of Batik SMEs can be improved by developing market orientation and agility simultaneously. The role of market orientation in improving marketing performance will be more effective if it is done indirectly through agility.