Phosphonic acids and esters are pervasive throughout the discovery sciences, from medicine and agriculture, to materials and asymmetric synthesis. The ability to install and construct molecular architecture containing phosphonic functionality has led to the development of new medicines and catalyst systems in the field of organo-and organometallic catalysis. To continue the advancement in the field, improved synthetic access to phosphorous-containing motifs is required. In particular, heterocyclic phosphonates and their acid derivatives are so far underdeveloped. The method described herein provides a robust and operationally simple procedure for the installation of various phosphonates to a wide range of electrophilic heterocycles.