Abstract: Phthalic acid yielded N-methylphtalimide (1) and N-methylthiophthalimide (2) when heated at 190220°C with hexamethylpho sphoric triamide (HMPA) in the presence of sulfur. Phthalic anhydride gave N, N, N' N'-tetramethylthiophthalamide (4) and N, N, N, N', N'-tetramethyldithiophthalamide (5) under the same conditions. Phthalic thioanhydride also yielded (4) and (5) when heated at 200220°C with HMPA without sulfur, and at 150°C only dimers of phthalic thioanhydride were formed.