The specificity and sensitivity of the current diagnostic and prognostic biomarkers for gastric cancer (GC) are limited. The present study aimed to evaluate the diagnostic and prognostic significance of cluster-of-differentiation gene 44 variant isoform 9 (CD44v9) and T cell immunoglobulin and mucin domain-containing protein 3 (TIM3) expression levels alone or combined in the tumor tissues of patients with GC and reveal the roles of CD44v9 and TIM3 in the cytokeratin (CK)+ and CK- regions. Multiplex immunofluorescence staining was performed for CD44v9, TIM3 and CK using a tissue microarray. The tissues were divided into three regions based on CK expression: Total, CK+, and CK- regions. The diagnostic and prognostic value was evaluated using receiver operating characteristic curves, Kaplan-Meier and Cox regression analyses. The results demonstrated that the density of cells expressing CD44v9, TIM3 and co-expressing CD44v9 and TIM3 (CD44v9/TIM3) in both the CK+ and CK- regions of tumor tissues was significantly higher than those in normal tissues (P<0.001). Moreover, the expression of CD44v9 in the CK- region was significantly positively correlated with age and tumor grade (P<0.05), and the expression of CD44v9/TIM3 in the CK- region of tumor tissues was significantly positively correlated with age, tumor grade and metastasis (P<0.05). Furthermore, the area under the curve for TIM3 expression in the CK+ region was 0.709, with a sensitivity of 45.83% and a specificity of 85.54% (P<0.001). High expression of CD44v9 in the CK- region was also significantly associated with poor survival and independently predicted a poor prognosis in patients with GC (hazard ratio, 2.387; 95% confidence interval, 1.384-4.118; P<0.01). In conclusion, dividing tissue regions based on CK expression is important for the diagnosis of GC. The expression of TIM3 in the CK+ region demonstrated diagnostic potential for GC, and high expression of CD44v9 in the CK- region was an independent prognostic risk factor for patients with GC.