Immortals: #4 Realms of the Gods by Tamora Pierce
Daine should have killed Ozorne when she had the chance. Now the former Emperor turned Stormwing has raised a band of pirates, brigands and Immortals intent on destroying Tortall. But through his quest for revenge, the evil mage has unleashed a darkness beyond even his reckoning. Ozorne has made a foolish pact with Uusoae, God of Chaos. Daine must seek help in the Divine Realms, for this vile queen will not stop with the extermination of Tortall. She exists with one purpose - to suck all life into chaos and oblivion.