Limited resources on Arima led the Arimans to war with their neighboring species, the Mazdans, which began as a fierce rivalry and grew into a religious war as they evolved from cavemen to tribesmen, from a feudal society to a modern interstellar culture.
Their religious and political leader was the Ariman high priest. Religious writings foretold that on a special day Vengwal would materialize in an outdoor temple and lead them to victory. He was expected to appear the same day as their enemy’s god appeared on Mazda.
Both sides desired membership in the Federation in the 23rd century, but neither the Ariman high priest nor the Mazdan high priest would agree to sign a peace treaty. The Federation Council permitted membership so long as a cease-fire was maintained.
In 2267, the USS Enterprise visited R-517 on the day of the prophecy. James T. Kirk, Spock and Leonard McCoy beamed down and met with the Ariman high priest in Vengwal’s temple. Both gods seemed to appear at the appointed time, propelling both sides to restart their war. Professor Osric Whipple redirected the Enterprise’s deflector shield energy into a magnetic wall that adhered the enemy ships to each other. Inadvertently, the process converted Whipple into a non-corporeal state, where he was interpreted as the deities of both worlds who wanted peace. Both sides agreed to peace talks. (TOS comic: "Destination Annihilation")