Rail passengers faced delays and cancellations after lightning strikes damaged signalling equipment.
ScotRail said there was disruption on the Highland mainline and far north line early on Wednesday following stormy weather.
Passengers travelling on Caledonian Sleeper services also faced delays after lightning strikes damaged signalling equipment in the north of England.
ScotRail said both the Glasgow/Edinburgh to Inverness and Inverness to Wick lines have now reopened and services are returning to normal.
A ScotRail spokesman said: “We’re sorry to our customers who had their journey disrupted this morning. Engineers worked as quickly as possible to fix the signal faults and get services back to normal.
“Anyone delayed by 30 minutes or more is entitled to claim money back through our delay repay guarantee on our website or mobile app.”
Caledonian Sleeper said it was working to resolve the issue.
The company tweeted: “We sincerely apologise again to guests on board these services.
“We are working closely with Network Rail colleagues to monitor the situation and keep trains moving.
“Services to Inverness, Aberdeen and Fort William are unaffected.”
The Met Office has also issued a yellow warning for thunder storms in the east of the country.
A Network Rail spokeswoman said: “The weather conditions over the course of the morning have caused several track circuit failures and level crossing barrier failures across the rail network.
“Engineers have been deployed to the relevant sites to fix the equipment and are working hard to rectify the faults.
“There are still some ongoing delays to rail services as trains and crew are out of position, but services will begin to return to normal over the course of the day.
“We have teams on stand-by all over the network to make sure that issues are resolved as quickly as possible.”