The north-eastern state of Kelantan, bordering Thailand, was the worst affected.