He was then recruited by the Plant Breeding Institute (PBI) at Cambridge to study the introduction of useful variation into the wheat crop from its wild relatives.
This discovery of the Ph gene allowed the first "genetic engineering" and his methods have since been used around the world in all major cereal breeding programmes.
In 1972, he became Director of the PBI and during his six years as Director strove to improve production in UK arable agriculture, developing fundamental research programmes on breeding and introducing plant molecular biology in the UK.
During his directorship wheat yields increased from four tonnes per hectare to 6 t/ha, due in large part to the improved PBI varieties.
In 1978 Ralph Riley left the PBI to become Secretary (chief executive) of the Agriculture and Food Research Council (now the Biotechnology and Biological Sciences Research Council), where he served as Secretary for seven years and Deputy-Chairman for a further two.