The earliest known international agreement, a piece treaty agreed between the Ancient Egyptians and the Hittites after the Battle of Kadesh. Kadesh is also the oldest record of a tactical battle with formations largely preserved. It was a war of superpowers of its time, 6,000+ Egyptian chariots were there. Most probably ended in a stalemate
After Kadesh the Egyptian Pharaoh Ramses II had a political problem since he had already made peace with his greatest enemy he could no longer sell the savior of Egypt tag to consolidate his power like even today politicians wag wars, create tensions to win elections. He solved this dilemma by using religion, proclaiming his divinity. As a living God who ought to be worshiped not as an oracle or something, this was an unprecedented but genius move that worked. He ruled for 66-67 years more than almost all Pharaohs.