The encephalopathy caused by ifosfamide and similarly acting compounds can be prevented or treated by the administration of methylene blue or another compound which is able to oxidize a reduced flavin moiety. Pyritinol is able to reduce other aspects of ifosfamide toxicity.