© The Guardian
Man swept along 15 metres on to railway line by torrent outside his home in Walsden following day of heavy rainfall

Roads and railway lines were submerged in water after torrential rain and flash flooding hit one small town for the second summer in a row.

Parts of the market town of Todmorden, West Yorkshire, were left under 45cm (18in) of water. Emergency services worked late into Monday night to clear the water and deal with hazards such as partially collapsed roads.

One resident in nearby Walsden was swept along about 15 metres by the torrent. He was carried downhill and ended up on the railway tracks at the end of his street.

Clearing out his flood-damaged home, the man said he was too shaken to talk about the incident.

One of his neighbours said: "The water was bubbling up and he was trying to redirect it. He went through the gate, was taken down the road and under the gate, on to the railway lines.

"He thought he was a goner. It's a fair distance. And with the torrent that was coming through, he's lucky to be alive today. Very, very lucky."

West Yorkshire police asked people to avoid areas in Todmorden that were badly affected and said that waves from driving through the water could damage houses.

People were also warned not to cross a bridge in the town police that believe may have been damaged.

The nearby village of Walsden was hit by up to 46cm of water, causing "sheer devastation", according to residents, as it poured from a culvert and down a side street, ripping huge chunks out of the road surface and destroying the road.

Water was still pouring down the street and through at least one house on Tuesday and about 20 homes were thought to have been flooded.

Railway lines were submerged and Walsden station remained closed on Tuesday as maintenance crews repaired the tracks.

The flooding in Todmorden followed a day of severe rain across the UK with heavy, slow-moving and thundery showers crossing the country.

The Environment Agency has issued three flood warnings - two on the river Spodden in Whitworth, Lancashire, and one at Walsden in Todmorden - as well as eight flood alerts across the country.

However, forecasters said the recent hot weather was expected to return later this week, with temperatures of up to 30C (86F) in the south-east on Thursday.

Matt Dobson, a senior forecaster with MeteoGroup, the weather division of the Press Association, said: "Today there could be scattered heavy showers and a few thunderstorms to the northern half of the UK.

"Across the south there will be a band of rain moving eastwards across southern England this morning, leaving sunny spells and scattered showers in the afternoon.

"Some areas will see heavy rain today, with temperatures a shade below what you would expect, but they will begin to rise on Wednesday, when it may reach 23C to 24C in the south-east.

"We can expect Thursday to be very warm or hot, with temperatures up to 30C in the south-east, 28C to 29C across the Midlands, and 25C to 27C in the north.

"There will be a growing risk of showers and thunderstorms from Friday night into the weekend."