To obtain penicillin and cephalosporin that are stable and can be readily purified in high yield by carrying out the reaction of 6-amino-penicillanic acid or 7-amino-cephalosporanic acid with an amide in the presence of an immobilized penicillin acrylase enzyme under specific conditions.
7-Aminopenicillanic acid represented by formula I or 7- aminocephalosporanic acid of formula II (R1 is H, a halogen, methyl, methoxy, a 1-4C alkenyl, a methylene bonding via O, S or N to an organic group) is allowed to react with an amide (or its salt) of formula III [R is a (substituted) hydrocarbon 6-membered ring; R2 and R3 are each H, a 1-3C alkyl] in an aqueous medium, at -5-+35°C in the presence of penicillin acylase immobilized on an azlactone polymer support at a molar ratio of 1 mole of a compound of formula I or formula II to 1.5-3 moles of the amide of formula III whereby penicillin of formula IV or cephalosporin of formula V is obtained in high yield.