Background: Staphylococcus aureus (S. aureus) is responsible for most cases of food poisoning all around the world. These carriers and manipulated foodstuffs are the main sources of bacteria transmission to ready-to-eat food. This study aims to determine the genetic affinity of methicillin-resistant Staphylococcus aureus (MRSA) strains isolated from cream pastries and workers, nasal of Shiraz city confectioneries. Methods: 30 MRSA strains (7 nasal carriers, 23 food isolates) were selected from the bank of bacteria at Shiraz medical faculty. To determine the genetic affinity of the isolates, RAPD-PCR technique was performed using OLP6, OLP11, and OLP13 primers. RAPD-PCR patterns were analyzed using the software GelJ. Results: By using primer OLP6 only 5 RAPD-PCR patterns were produced from DNA ampliqons of creamy pastry isolates and were not enough to compare the genetic affinity of all the isolates. Based on 100% similarity, OLP13 primer produced 20 different patterns with some bands in the range of 1 to 11, and the OLP11 primer produced 22 patterns with some bands from 3 to 11 bands. At closely and possibly genetically related levels, the isolates are categorized into (13-15) and (1-5) clusters. In general, all the isolates are classified into human and food isolates. Conclusions: There was no genetic affinity of MDSA isolates regarding human and food samples; but, a high percentage of close genetic relationship between the isolates increases the possibility of bacteria transfer from humans to pastries and food poisoning.