Abstract: Cephalosporins and penicillins rearrange under the influence of mercury(II) trifluoroacetate in methanol to non-β-lactam products. The mechanisms of the rearrangements are different in the two cases: while it results in the open-chain 4 aminoacrylic acid derivative with cephalosporins, the 7 oxazole and the 6 propionamide derivatives form from penicillins.