 On his appointment as Recorder of Cardiff he was obliged to resign from Parliament and fight a by-election on 22 June but he was again returned unopposed.He served on until the 1922 general election when he stood in a different seat and was defeated.In 1919 Rhys-Williams was appointed parliamentary secretary to the Ministry of Transport under the direction of the Minister of Transport Sir Eric Geddes.