Palladium catalysed coupling reactions of 6-O-tert-butyldimethylsilyl-1-bromocodeine and 6-O-tert-butyldimethylsilyl-3-trifluoromethylsulfonylmorphine allow a range of substituted analogues of codeine in the 1-position and morphine in the 3-position to be efficiently and selectively prepared.