Scotland's beleaguered Transport Minister Stewart Stevenson has resigned over his handling of the travel chaos caused by the extreme winter weather.
Snow and ice brought much of central Scotland's road network to a standstill earlier this week.
Mr Stevenson had faced days of pressure over the way he handled the problems.
The SNP MSP said he "could have done much more to ensure that members of the public were better informed of the situation".
In his resignation letter, Mr Stevenson, the MSP for Banff and Buchan, said: "I deeply regret that and for that reason I feel I should step down."
First Minister Alex Salmond accepted the resignation with "great regret".
In a letter to Mr Stevenson, the first minister added: "I understand your reasons for resigning but frankly I think it is wrong that you should have faced this situation.
"You have worked to ensure the preparedness of our transport network for winter weather. These plans have generally proved effective but on Monday we were faced with an unprecedented challenge."
A heavy snowfall on Monday - which appeared to take the authorities by surprise - caused the closure of the M8, M9 and A80, as well as gridlock on many other routes across Scotland.
Thousands of vehicles were abandoned and hundreds of people were stuck in their cars overnight.
On Tuesday morning, Strathclyde Police reported that the snow and ice on some roads was breaking the blades on snow ploughs.
The M8, Scotland's busiest road, was closed for two days between Edinburgh and Glasgow.
Mr Salmond will announce on Sunday who will take over from Mr Stevenson as transport, infrastructure and climate change secretary.
Finance Secretary John Swinney has taken charge until a replacement is announced.
Scottish Labour leader Iain Gray said: "Scotland had lost confidence in the transport minister and it was only right that he should resign.
"The first minister should not have stretched the issue out over the last week and acted more decisively at an earlier stage."
Scottish Conservative leader Annabel Goldie said the SNP government had "bowed to the inevitable".
She said: "Conditions in Scotland were appalling. The first minister and his transport minister were being controlled by events. There was weak leadership and an absence of direction.
"Stewart Stevenson has taken the right decision to resign, but the first minister and whoever replaces Mr Stevenson have major work to do to regain public confidence."
Scottish Liberal Democrat leader Tavish Scott said: "The people of Scotland deserve an awful lot better than they're getting at present from the SNP.
"The first minister needs to stand up and take responsibility for the shambles his government is in."
In his resignation letter Mr Stevenson, who has been a minister since the SNP were elected in 2007, said he had first offered to quit on Thursday but Mr Salmond had convinced him to rethink.
Mr Stevenson added: "I am also conscious there has been a lot of party politics in the last few days and that my continued presence in government would be used politically by our opponents.
"I have not devoted my adult life to winning Scottish independence and to working for and serving in this first SNP government to allow that to happen."
Mr Salmond replied to the resignation letter by saying: "Even your harshest critic would admit that you have always pursued any task you have addressed with diligence and devotion.
"Both these qualities have been evident in your service as a minister in this first SNP government."
Mr Salmond went on to criticise the "reprehensible" parliamentary game-playing of some political opponents.
Your reaction to the resignation
He had to go. My wife had to endure a 10-hour journey with a six-month-old - a journey that should have taken 30 minutes. Even today the pavements around Motherwell and Wishaw are impassable to anyone with a pushchair. We supposedly live in a modern society, yet we can't cope with a bit of snow. John MacPherson, Motherwell
The man has been made a scapegoat. The fundamental problem which all politicians do not seem to be addressing is the need for compulsory winter tyres to be made law in this country. The fact that so many lorries on our roads are going around in extreme winter conditions using summer tyres is madness. The case for this isn't going to be heard in Westminster where, in England, conditions are less severe. Holyrood, get your act together and follow Europe's example on road safety. Angus McPhail, Ceres, Fife
Delighted that he has done the honourable thing. The snow deluge is not his fault, but to allow Scots to be stuck in vehicles and insist that the best is being done to help them is unacceptable. Sharon Black, Arbroath
Ridiculous that Mr Stevenson felt he had to step down. Monday's weather was well forecast over the preceding weekend, and come 0930 on Monday morning the snow did fall as expected. Gritting wagons were out on the road and the roads teams really did try their best to get through and clear roads. However, in too many cases inexperienced drivers and cars which couldn't drive effectively in the snow brought the chaos to the roads by blocking carriageways. I would like to see those who have called for this resignation do any better, given the circumstances. Ronnie Henderson, Larkhall, Lanarkshire
The handling of this was disgraceful. They never salted the roads before the big freeze so the snow and ice took hold. Normally cars that have been out these conditions would be covered in salt spray. Have a look for yourself, none to be seen. I rest my case. Alex Salmond, you must try harder, if this happens again you are in the firing line. Des O' Leary, Edinburgh
I think he has been very honourable in stepping down but the weather was extreme and no one could have foreseen the dreadful conditions. Preparations had been made in Dumfries and Galloway which have just taken delivery of 11 new gritters - I'm sure other areas were equally prepared. The handling of the closure of the M8 is perhaps the main issue and the overnight stranding of scores of drivers that could easily have resulted in fatalities. John Carroll, Castle Douglas, Dumfries and Galloway
Mr Stevenson was not to blame for the snow and he was right when he said it fell at the wrong time of day but it was his department who made mistakes on Monday morning. But his biggest mistake was speaking on Newsnight Scotland on Monday night and saying there had been "a first class response to difficult conditions" - this at a time when hundreds of people were stranded on the motorways. It showed a lack of understanding of the situation and made his resignation inevitable. S Miller, Glasgow
The pillorying of a single individual over exceptional weather conditions is surely unprecedented, particularly as predicated upon a single day's events. Only in "poor wee" Scotland would self-serving opportunists seek to politicise bad weather to attack our national government, and the taking of a political scalp in this shoddy manner brings shame not only upon themselves and the Parliament, but upon our country as a whole. Douglas Blackie, Aberdeen