20 years ago from the start of ARR (2.0). I am not sure where you're getting 40. There was a pretty good summary of Ala Mhigan lore that someone compiled some time ago (try forum searching for it)
There's a timeline in the wiki section of this site with a brief outline of 1552 - 1557. The last king of Ala Mhigo, Theodric, came into power and subsequently started killing all worshipers of Rhalgr (the Fists of Rhaglr had a lot of pull in the city state; Theodric didn't like that). Over the course of five years, the internal war made the once mightiest nation on the continent rather vulnerable to the Garlean invasion which was in 1557. One could argue the downfall of Ala Mhigo happened in 1552, but 1557 was the year Theodric took his own life as opposed to being killed by his court and people on the onset of Garlean invasion.
There's a timeline in the wiki section of this site with a brief outline of 1552 - 1557. The last king of Ala Mhigo, Theodric, came into power and subsequently started killing all worshipers of Rhalgr (the Fists of Rhaglr had a lot of pull in the city state; Theodric didn't like that). Over the course of five years, the internal war made the once mightiest nation on the continent rather vulnerable to the Garlean invasion which was in 1557. One could argue the downfall of Ala Mhigo happened in 1552, but 1557 was the year Theodric took his own life as opposed to being killed by his court and people on the onset of Garlean invasion.