A patient receives a tuberculin skin test during a routine medical evaluation. Two days later, the injection site becomes firm, red, and swollen. The physician explains that this reaction occurs because immune cells recognize the antigen and recruit additional inflammatory cells over time. Which type of hypersensitivity reaction best explains this response?