Train services between Leeds and Harrogate have been restored following Thursday's heavy rain.
The line reopened at 1150 BST on Friday after being closed by flooding at 1900 BST on Thursday.
Engineers worked through the night to repair the track and signalling equipment damaged when water covered the line at Horsforth in north Leeds.
Flood warnings were still in force on Friday for the Ouse at Naburn Lock and for riverside footpaths in York.
Families living at Sandway at Crossgates in Leeds had to abandon their homes for a time on Thursday evening when water flooding into their properties.
In Doncaster, the council distributed over 300 sandbags to keep flood water from homes.