A mild and efficient one-pot synthesis of esters based on the Pd-catalyzed alkoxy- and aryloxycarbonylation of allylic and benzylic halides is described. The methodology has been applied to primary, secondary, and tertiary alcohols as well as to phenol derivatives. The O-protection of some biologically relevant molecules is also reported. alcohols - allyl halides - benzyl halides - esterification -