Both Divines, white and black, declared Exalted Marches and for the only time since the Schism of the Chantry, they worked together. A century-long siege resulted, with the giant Qunari entrenched in Antiva and Rivain, and all of Thedas throwing armies against them.
The war drained the resources of every nation in Thedas, leaving most on the brink of collapse. For the giants, it did not appear to be the damage to their armada or the loss of their soldiers, but the terrible toll upon the Rivaini population that prompted their retreat. When the Third New Exalted March had all but massacred the people of Kont-aar without even chipping the Qunari occupying force, the giants finally withdrew.
The treaty that put an official end to the Qunari Wars was signed on the politically neutral island of Llomerryn off the southern coast of Rivain. 150 years after the assault on the mainland began, the Qunari left our shores. They received the northern archipelago in exchange for cessation of hostilities against all the nations on the accord. Only Tevinter refused to sign, and so the war continues to rage in the Imperium to the present day.
It's worth noting, however, that the Kingdom of Rivain immediately violated the treaty. Twice. Once, when the humans of northern Rivain—nearly all practitioners of the Qun and therefore by definition, "Qunari"—refused to leave their homes and go in exile to the islands. And again, when the Rivain Chantry and nationalist forces, unable to convert its people back to the worship of the Maker, tried a purge by the sword, slaughtering countless unarmed people and burying them in mass graves. It's a fortunate mystery that the leaders in Kont-aar did not alert their allies in the Northern Passage, or we'd still be fighting the giants now.
—From The Exalted Marches: An Examination of Chantry Warfare, by Sister Petrine, Chantry scholar