The programmed death receptor 1/programmed death receptor ligand 1 axis (PD-1/PD-L1) is involved in tumor immune escape and is a potential prognostic biomarker and anti-tumor immunotherapy target in patients with gastric cancer (GC). However, the results of studies obtained in recent years have been inconsistent. The present study aimed to determine the possible predictive significance of PD-L1 in conjunction with three proteins linked with PD-L1 regulation in patients with primary GC. In the present study, the PD-L1, human epidermal growth factor receptor 2 (HER2), cluster of differentiation (CD)133 and microphage-associated CD68 expression levels were identified by multiplexed immunohistochemistry and assessed by automated pathological analysis system in 93 GC tumors and neighboring normal tissues arrayed on the same tissue microarray. All four proteins were statistically analyzed in relation to the clinicopathological characteristics. The expression levels of HER2, CD133 and CD68 were considerably higher in cancer tissues compared with neighboring normal tissues (P<0.05), however, the reverse trend was detected for PD-L1 expression (P=0.0577), particularly in tumor nest (TN; P<0.05). There was no significant correlation between the HER2 and CD133 expression levels and clinicopathological factors. However, significant relationships were found between PD-L1 expression and the TNM stage, pathological differentiation and survival status of patients (P<0.05). Moreover, survival time was prolonged in individuals with elevated PD-L1 expression in TN and GC tissues, but no significant correlation was identified (P=0.0881). The CD68 expression level in tumor stroma, but not in TN, was significantly correlated with poor pathological differentiation in patients with GC (P<0.05). However, PD-L1+CD68+ macrophages were strongly related to lower tumor size (diameter <5 cm), early TNM stage (stage I+II), good pathological differentiation and overall survival in TN (P<0.05). In conclusion, PD-L1+CD68+ macrophage infiltration in TN might be a potential indicator of prognosis in patients with primary GC and merits further investigation.