The preparation of sultams is disclosed. In one embodiment (e.g. scheme (I)), an alkanesulfonyl halide is reacted with a haloalkylamine to obtain the corresponding N-(haloalkyl)alkanesulfonamide which is then cyclized in the presence of a deprotonating agent to give the sultam. The sultams are useful as intermediates in the preparation of naphthyridine carboxamide compounds which are HIV integrase inhibitors.