Answer
Greece gained its independence from the Ottoman Empire during the reign of Sultan Mahmud II, who ruled from 1808 to 1839. This significant milestone was marked by the Greek War of Independence, a conflict that lasted from 1821 to 1832. The war culminated in the establishment of an independent Greek state, marking a pivotal moment in the history of both Greece and the wider region.