Several immune-related markers have been implicated in basal cell carcinoma (BCC) pathogenesis. The BCC inflammatory infiltrate is dominated by Th2 cytokines, suggesting a specific state of immunosuppression. In contrast, regressing BCC are characterized by a Th1 immune response with IFN-γ promoting a tumor suppressive activity. IL-23/Th17-related cytokines, as interleukin (IL)-17, IL-23 and IL-22, play a significant role in cutaneous inflammatory diseases, but their involvement in skin carcinogenesis is controversial and is poorly investigated in BCC. In this study we investigated the expression of IFN-γ, IL-17, IL-23 and IL-22 cytokines in BCC at the protein and mRNA level and their modulation during imiquimod (IMQ) treatment or photodynamic therapy (PDT). IFN-γ, IL-17, IL-23 and IL-22 levels were evaluated by immunohistochemistry and quantitative Real Time PCR in 41 histopathologically-proven BCCs (28 superficial and 13 nodular) from 39 patients. All BCC samples were analyzed at baseline and 19 of 41 also during medical treatment (9 with IMQ 5% cream and 10 with MAL-PDT). Association between cytokines expression and clinico-pathological variables was evaluated. Higher levels of IFN-γ, IL-17, IL-23 and IL-22 were found in BCCs, mainly in the peritumoral infiltrate, compared to normal skin, with the expression being correlated to the severity of the inflammatory infiltrate. IFN-γ production was higher in superficial BCCs compared to nodular BCCs, while IL-17 was increased in nodular BCCs. A significant correlation was found between IFN-γ and IL-17 expression with both cytokines expressed by CD4+ and CD8+ T-cells. An increase of all cytokines occurred during the inflammatory phase induced by IMQ and at the early time point of PDT treatment, with significant evidence for IFN-γ, IL-23, and IL-22. Our results confirm the role of IFN-γ and support the involvement of IL-23/Th17-related cytokines in BCC pathogenesis and in the inflammatory response during IMQ and MAL-PDT treatments.