The Fremantle rail bridge has been closed after it was hit by a ship torn from its moorings as wild weather swept across Perth and the South West last night.
Thousands of people were without power and homes were damaged in the storm.
Two ships swung away from their North Quay berths at Fremantle and one hit the rail bridge.
Trains between Fremantle and North Fremantle have been cancelled and replaced by buses. The line could be closed for a week.
It is understood that the ship had just finished unloading a cargo of cars when the incident occurred.
The other ship – a general cargo ship – damaged another vessel.
Fremantle Ports spokeswoman Ainslie DeVos said the general cargo ship hit the Parmelia 1.
It is understood that strong winds forced the general cargo ship and the car carrier to swing around and break their stern lines.
There will be an investigation into how this occurred.
The bridge will be inspected by structural engineers today.
Public Transport Authority spokesman David Hynes said today trains would run as normal to North Fremantle, but services between North Fremantle and Fremantle had been cancelled and replaced by buses.
"Trains are running in both directions between Perth and North Fremantle – the last station on the line before Fremantle – and replacement buses are operating between North Fremantle and Fremantle Station," Mr Hynes said.
"Though the shuttle bus service is operating over a relatively short distance, the journey to and from Fremantle will take longer, so extra time should be allowed."
Mr Hynes said there was likely to be some minor disruption to timetables over the rest of the line.
Other lines are not affected.
One of the masts that support the train line’s overhead electrical power system was smashed and some of the supporting infrastructure sustained extensive damage in the crash, which happened around 10.15pm, Mr Hynes said.
He said the disruption was likely to remain in place for at least a week while the damage was repaired and an investigation was completed to determine if there was any structural damage to the bridge.
The cold front with "lots" of thunderstorms meant there was a more active thunderstorm line than normal for this time of year.
Bureau of Meteorology duty forecaster James Ashley said a band of thunderstorms moved through the south-west of the State and right up to Shark Bay.
"Normally fronts come through and there’s the odd thunderstorm, but this was very, very active thunderstorm-wise as the line went through,” he said.
"And they’re still chugging out through the Wheatbelt at the moment.
“We’re still expecting thunderstorms to go through the eastern Wheatbelt and into the Goldfields during the course of the day.”
Mr Ashley said there was lots of wind associated with this storm as it came through.
“But after it came through things eased off considerably and now we’re looking at a showery day with a chance of a thunderstorm,” he said.
Conditions in Perth and the South West today would be reasonably blustery but not as severe as yesterday evening.
The weather would ease in Perth this evening.
Mr Ashley said the band of storms passed through Perth late yesterday evening and through other parts of the South West in the late afternoon and early evening.
There were reports of wind gusts of up to 120km/h at Busselton Jetty, 106km/h in Ocean Reef and 104km/h on Rottnest Island, he said.
The weather station in Bunbury reported a maximum wind gust of 91km/h just after 9pm and although they were strong wind gusts, Mr Ashley could not confirm that a tornado had swept through the area.
Another front is expected to come through on Thursday.
There would probably be “some decent rainfall and a chance of a storm”, but the system would not be as severe, Mr Ashley said.
Western Power said 17,000 customers in the South West and 3000 in Perth lost power during the storm last night.
The SES started receiving calls for help in Perth about 6pm, while the first call from Bunbury came at 9pm.
Most of the problems involved roofs being completely blown off or damaged, fallen trees and some power line damage.
Crews are working to safely restore power to 2400 houses this morning, after working through the night to repair damage to the network caused by strong winds and lightning.
State Emergency Service volunteers were called to several homes around the South West where properties had been damaged by strong winds.
The SES received 58 calls for assistance until 6.08am today, with 32 of those in Carey Park.
Wind gusts up to 120kmh were recorded at Busselton Jetty and at more than 100km/h at Ocean Reef, Rottnest Island and Cape Naturaliste.
Since 9am yesterday, Badgingarra recorded 34.2mm of rain, followed by Witchcliffe with 28.8mm, 23mm in Swanbourne, 22.8mm in Bridgetown and 21.2mm in Bickley.
The severe thunderstorm warning for people west of a line from Geraldton to Morawa to Gingin to Dwellingup to Albany including the Perth Metropolitan Area has been cancelled.
A roof was torn from a two-storey home near Bunbury and several powerlines were brought down by the storm.
Trees were felled throughout the South West and in Cowaramup, traffic on Bussell Highway was brought to a standstill after fallen trees blocked Bussell Highway near Gracetown at about 9pm.
More than 30 State Emergency Services and 20 career and volunteer Fire and Rescue Service personnel from Bunbury, Australind and Harvey units worked through the night to help the community after the thunderstorm hit the South West.
Damage was reported from the Perth metropolitan region to Bunbury, Augusta and Margaret River, with 58 calls for help since late yesterday.
The majority of calls involved minor damage to homes and roofs and fallen trees.
Main Roads WA is working to lift fallen trees, clear roads and fix traffic lights.