Nitrophenoxy- or phenylthiobenzeneacetonitriles are prepared by reacting a nitrophenoxy- or nitrophenylthiobenzene with an alpha,alpha-dinitrosubstituted acetonitrile in an inert solvent and in the presence of a base. The products are useful as intermediates for the synthesis of pharmaceuticals, such as fenoprofen.