Infections due to methicillin-resistant Staphylococcus aureus (MRSA) are present worldwide and represent a major public health concern. Capability of PCR followed by high-resolution melt (HRM) curve analysis for detection of community-associated and livestock-associated MRSA strains and identification of Staphylococcal protein A (spa) locus was evaluated in 74 MRSA samples which were isolated from the environment, humans and pigs on a single piggery. PCR-HRM curve analysis identified four spa types among MRSA samples and differentiated MRSA strains accordingly. A non-subjective differentiation model was developed according to genetic confidence percentage values produced by tested samples, which did not require visual interpretation of HRM curve results. The test was carried out at different settings and result data was re-analysed and confirmed with DNA sequencing. PCR-HRM curve analysis proved to be a robust and reliable test for spa typing and can be used as a tool in epidemiological studies.