In ketogenesis, two acetyl-CoA molecules condense to form acetoacetyl-CoA via thiolase. Acetoacetyl-CoA briefly combines with another acetyl-CoA via HMG-CoA synthase to form hydroxy-β-methylglutaryl-CoA. Hydroxy-β-methylglutaryl-CoA form the ketone body acetoacetate via HMG-CoA lyase. Acetoacetate can then reversibly convert to another ketone body—D-β-hydroxybutyrate—via D-β-hydroxybutyrate dehydrogenase. Alternatively, acetoacetate can spontaneously degrade to a third ketone body (acetone) and carbon dioxide, which generates much greater concentrations of acetoacetate and D-β-hydroxybutyrate. The resulting ketone bodies cannot be used for energy by the liver so are exported from the liver to supply energy to the brain and peripheral tissues.