Methyl penam-(3S)-carboxylate (methyl 7-oxo-1-thia-4-azabicyclo[3.2.0]heptane-(3S)-carboxylate), the basic skeleton of penicillin-type β-lactams, has been synthesized from D-cysteine methyl ester and tert-butyl formylacetate in three steps through the formation of the thiazolidinylacetic acid followed by cyclization by Mukaiyama-Ohno's procedure. Use of D-penicillamine methyl ester as well as the dimethyl derivative of tert-butyl formylacetate in the above method provides a general synthetic route to a variety of methyl penam-(3S)-carboxylates having methyl groups at the 2 and/or 6-positions.The yields as well as stereoselectivity at C-5 in the cyclization step are shown to be strongly dependent upon the patterns of substituents on the thiazolidinylacetic acid skeleton, and the reason for this is discussed from the mechanistic viewpoint.