Answer
Tuberculosis, a bacterial infection that predominantly affects the lungs, proved to be the fatal ailment that claimed the life of Mahmud II, the Ottoman sultan who reigned from 1808 until his demise in 1839. This contagious disease, known for its ability to cause persistent coughing, chest pain, weakness, and weight loss, ultimately led to Mahmud II's untimely death, leaving a significant impact on the Ottoman Empire during his 31-year rule.