Pathology

A 45 year old patient presents with history of fever, night sweats and weight loss. On X-ray, a mass in apical lobe of lung is seen. On histopathology, it was found to have caseous necrosis. What is the likely underlying process involved -