If someone is wearing the "war shackles," you need to load the latest save, repeat all the moves exactly as they were made before this battle, and disband the troops that were killed during this battle. Then, the attacker must attack and retreat/bribe their way out.
This sequence of actions is missing an important step; guess what it is :-D