Lactulose is useful in treating hyperammonemia (high blood ammonia), which can lead to hepatic encephalopathy. Lactulose helps trap the ammonia (NH) in the colon and bind to it.  It does this by using gut flora to acidify the colon, transforming the freely diffusible ammonia into ammonium ions (), which can no longer diffuse back into the blood. It is also useful for preventing hyperammonemia caused as a side effect of administration of valproic acid.