This invention relates to an isolated nucleic acid fragment encoding a galactinol synthase. The invention also relates to the construction of a chimeric gene encoding all or a portion of the galactinol synthase, in sense or antisense orientation, wherein expression of the chimeric gene results in production of altered levels of the galactinol synthase in a transformed host cell.