Background. Tumor necrosis factor (TNF) is a proinflammatory cytokine involved in the pathogenesis of a number of diseases, including cancer and autoimmune diseases. The -308(g/a)TNF and -238(G/A)TNF polymorphisms are included in the extended ancestral haplotypes covering the full range of HLA genes. We suggested that the previously discovered effect of these polymorphisms on the breast cancer patients overall survival may be the result of cooperation with the genomic environment, namely, the AH8.1 and B57 haplotypes associated with autoimmune conditions. Methods. We used the archival collection of DNA from 442 primary BC patients and 327 women of control group with known genotypes -308(g/a)TNF and -238(G/A)TNF. 412 BC patients were tested for marker alleles of AH8.1 and B57. The obtained results confirmed the association of -308a and -238A with markers of haplotypes AH8.1 and B57 respectively. Results. Analysis of the results showed that TNF gene polymorphisms do not affect the predisposition to breast cancer, but significantly reduce the OS of BC patients, and the final effect of TNF gene polymorphisms on the disease prognosis depends on the genomic context. At stage II of the disease, the carriers of the -308ag and -238GG in the presence of the markers of AH8.1 and the carriers of the -308gg/-238GG (regardless of the AH8.1 markers) had the 10-year OS above 80%, while the 10-year OS was below 50% for the -308ag/-238GG carriers in the absence of AH8.1 markers and for -308gg/-238AG carriers (p=0.0076). Conclusions. It was concluded that the mechanisms of action of -308(g/a)TNF and -238(G/A)TNF are different, and the decrease of OS for carriers of the minor allele -238A is mediated by its association with HLA-B*57, while the decrease of OS for carriers of the -308a, in contrast, is not associated with the ancestral haplotype AH8.1. Thus, two genetically determined groups of BC patients have been identified that have an unfavorable prognosis in the conditions of standard BC therapy.