I'm looking for a science fiction book that I read back in high school during the 1980's. There was an alien race that colonized a planet and drove the natives away. The alien race constructed machinery that released a gas into the atmosphere that kept them alive. Eventually the alien race dies out.
The alien race had servants with them. The last of the alien race told the leaders of the servants that the machinery eventually would fail and they would start to die. The slaves would not be able to fix or maintain the machinery.
The first chapter had a priest leading the religious ceremony with the gas releasing machinery. It fails and riots break out.
Another alien in a spaceship crash lands on the planet. The servants force him to fix the machinery but refuse to let him leave. He then sabotages the machinery and locks himself in a place where they can't get to him.
In the end a native of the planet kills the alien and I believe the servant people die out. The native emerges triumphant.