Martial law and related restrictions were put in place after Thailand 's military removed Prime Minister Thaksin Shinawatra from office in a peaceful coup in September .