2 Kings 8:28

And he went with Joram the son of Ahab to the war against Hazael king of Syria in Ramoth-gilead; and the Syrians wounded Joram.

Joram king of Israel and Ahaziah king of Judah joined forces in war against Syria at Ramoth-gilead. Joram was wounded in the fighting and withdrew to Jezreel to recover, leaving Jehu in command of the army. By his alliance with Joram, Ahaziah was drawn into the events that followed Jehu's anointing and the destruction of the house of Ahab.