Image copyright NEODAAS/University of Dundee Image caption A satellite image shows half the UK under snow and cloud

Drivers have been urged to stay off major roads unless absolutely necessary as a new snow storm approaches southern Scotland and northern England.

A Met Office amber "be prepared" alert is now in place from 21:00 on Wednesday until 05:00 on Thursday.

Scotland's Transport Minister Humza Yousaf said the authorities would be "tested to our limit".

An estimated 40,000 children missed classes as about 300 schools were shut across Scotland on Wednesday.

Media playback is unsupported on your device Media caption "We were on the road for 12 hours"

The travel warning came after hundreds of drivers were stranded on Tuesday night on the main route between Scotland and England.

Many drivers were stuck for up to 11 hours on the M74 in South Lanarkshire and Dumfries and Galloway after HGVs blocked the lanes.

Mountain rescue teams were sent to help drivers trapped in cars at Millbank and Beattock, checking they were warm and had adequate supplies.

Elsewhere, a lorry rolled down a hill in North Lanarkshire, smashing into other vehicles and a fence, after two workmen got out to help clear the road. No-one was injured.

Media playback is unsupported on your device Media caption A runaway lorry ploughed into cars before crashing on a snowy street.

In a statement in the Scottish Parliament Mr Yousaf apologised to anyone who had been stuck on the M74 but said it was as a result of "extremely challenging conditions", with persistent snow at a level that had not been seen for a number of years.

He also announced that police were upgrading their travel warning from level three to level four.

"That in practice means that all travel should be avoided on those parts of the trunk road affected by the amber warning, namely south and south-west Scotland for the duration of the amber warning," he said.

Stein Connolly from Traffic Scotland said the evening commute began relatively smoothly on Wednesday.

He told BBC Scotland's Newsdrive programme: "The M74 is black, it's running OK. You can see quite a substantial snowfall on the fields next to the 74 and even along the centre but the actual road is clear right now."

He said he believed the level four "do not travel" warning had only been issued once before, in the high winds of January 2013.

"We really hope that after last night people do listen to us. Avoid the area. We don't want a repeat of last night.

"If you do go out there, you're putting yourself at risk and other people at risk."

A guide to travel warnings

Image copyright Police scotland

Travel conditions are graded at four levels by police and transport officials depending on the severity of the weather.

Level 1: Normal operations - no severe weather.

operations - no severe weather. Level 2: Travel with caution - police advise people that conditions for road travel may be hazardous.

- police advise people that conditions for road travel may be hazardous. Level 3: High risk of disruption for road journeys - police advise that there is a high risk of disruption for road journeys. Travellers are likely to experience significant delays.

of disruption for road journeys - police advise that there is a high risk of disruption for road journeys. Travellers are likely to experience significant delays. Level 4: Avoid travelling on the roads - journeys should be avoided. Severe delays expected.

The Met Office has predicted persistent heavy snow, with travel delays likely on roads and a risk that some vehicles and passengers could become stranded.

Delays or cancellations are likely to rail and air travel. Some rural communities are likely to become cut off and power cuts are "probable".

Less severe yellow warnings remain in place with snow and ice forecast until Friday evening, with Scotland, Northern Ireland and the north of England likely to be affected.

Image copyright Met Office Image caption The amber warning extends until 05:00 on Thursday

On Wednesday, thousands of pupils missed lessons as about 300 Scottish schools or nurseries were shut or partially closed as a result of the weather.

Scottish Borders Council said no schools would open in its area on Wednesday or Thursday, with 15,000 pupils missing lessons and 26 schools were also shut in Dumfries and Galloway, affecting 4,000 students.

In the Highland Council area, nearly 150 schools and nurseries were shut or partially closed, affecting 15,000 pupils.

Nearly 30 schools and nurseries were closed in South Lanarkshire and there are also a number of schools shut in East Ayrshire, Stirling, Falkirk and Perth and Kinross.

Media playback is unsupported on your device Media caption Video released by a Dumfries and Galloway rescue team shows difficult driving conditions

Overnight travel on the M74 was particularly difficult around junction 12 in South Lanarkshire southbound and between junctions 14 and 15 northbound.

One driver stuck on the northbound carriageway of the M74, Fergus McCann, said the impatience of other drivers had made things worse.

He told the BBC: "There's been a fair bit of impatient driving going on.

"People are in one queue, then people are cutting out and trying to go down lanes that clearly are not for driving on.

"It's not a surprise that you're getting a few hundred yards down the road and you're seeing them facing the wrong way."

Steve Harris became stranded on the M74 at 17:30 GMT and was still stuck between junctions 11 and 12 more than eight hours later.

"I've not moved really in the last four hours," he told BBC Radio 5 live at about 03:00 GMT.

"I've managed to get out of my car a couple of times to stretch my legs. The snow is probably between four and six inches deep around the cars."

Image copyright PA Image caption Drivers faced heavy snow in Edinburgh

Image copyright @JacquesOeuf/Twitter Image caption Car and lorries were tailed back on the M74 southbound