they established the first democracy in athens , truly put to the test by king leonidas and his 300 spartans , who fought to the death in 480 bc at the battle of thermopylae to remain free from the reign of xerxes , the persia king bent on dominating the world .