Complex sentence: The war continued until 1988, when Iraqi army defeated the Iranian forces inside Iraq and pushed the remaining Iranian troops back across the border, subsequently Khomeini accepted a truce mediated by the UN.
Split into simpler sentences: The war continued until 1988, when the Iraqi army defeated the Iranian forces inside Iraq and pushed the remaining Iranian troops back across the border. Subsequently, Khomeini accepted a truce mediated by the UN.