Image copyright South Wales Police Image caption A warning was given after a car "aquaplaned" on the M4

A three-car crash on the M4 caused severe delays earlier as heavy rain battered parts of Wales.

There were queues eastbound between junction 32 for Capel Llanilltern and junction 33 for Coryton in Cardiff.

All lanes had reopened by 09:45 BST, but Traffic Wales warned of delays as queues cleared.

Police urged drivers to take care as the Met Office issued a yellow warning for storms which is in place across the country throughout Tuesday.

Congestion on the M4 stretched back to junction 35 at Pencoed, Bridgend county, at the height of the problem, with delays of one hour and 40 minutes.

Police warned motorists to "please, please slow down, plan ahead and allow more time for your journey".

It came after a car "aquaplaned" after being driven at "too high a speed for the conditions", South Wales Police's road policing unit said.

Image copyright Traffic Wales Image caption There was heavy congestion back to junction 35 of the M4 on Tuesday morning

Image copyright @TrafficWalesS Image caption Two lanes of the M4 were closed after a three vehicle crash

All 22 of Wales' local authorities are covered by the yellow warning for thunderstorms and the Met Office said bus and train services could be cancelled.

"There is a small chance that homes and businesses could be flooded quickly, with damage to some buildings from flood water, lightning strikes, hail or strong winds," it added.

Four counties - Conwy. Denbighshire, Flintshire and Wrexham - are covered by a further yellow warning for thunderstorms on Wednesday.