A novel method for the formation of N-substituted phthalimides is described which is based on the palladium-catalyzed carbonylation and coupling of o-dihalo aromatics and primary amines. Optimal conditions established for the reaction using o-diiodobenzene and aniline were DMAc (0.2 M), 115-degrees-C, 90 psi of CO, 3% PdCl2L2, and 2.4 equiv of DBU. This process is tolerant of a wide variety of functional groups and gives good yields of the desired products. Variables such as temperature, catalyst type and loading, CO pressure, solvent, and base were examined to optimize this reaction. The reaction of aniline with 1,2-dibromocyclopentene under similar conditions gave a variety of products.