Ahriman is the most difficult boss on the final floor. Ahriman uses the Earthquake attack, which can instantly KO party members. The Ahriman also uses Blaze, Thunderbolt and Icestorm, all of which can deal more than 300 damage to the entire party. Ahriman has negligible physical attack that inflicts minor damage. He can also heal himself (almost 200 HP) with Cura.
Despite its in-game bestiary input, the Ahriman does not have resistance to Sleep.
Ahriman is best saved until the party is level 45 or higher. Ribbons and NulDeath/NulAll will guard against its Earthquake. Because Earthquake is considered an Earth-elemental attack, and not a Death-elemental attack, Protect Rings will not provide resistance to it (unlike what the ingame description may suggest). Even without resistance, higher level parties can avoid it fairly reliably thanks to their natural Magic Defense, with the White and Black Wizard boasting the highest Magic Defense growth of the classes.
Its other elemental attacks are not used as frequently as Earthquake, but it is still best to have the White Wizard cast Healaga to patch up the damage. A Sleepra spell, cast by a Black Wizard, is potent enough for the effect to stick.