Diazoacetates 1a, b undergo BF3 OEt2 catalyzed carbenoid attack on the oxygen of the phosphoryl double bond of phosphate triesters 2a-c or on the sulfur of thiophosphoryl double bond of thiophosphate 9 to form corresponding O-alkoxycarbonylmethylphosphates 3a-c or S-alkoxycarbonylmethylphosphate 13.