The announcement that Longannet power station in Fife will close next year is not a complete shock (the plant had been expected to shut by 2020 at the latest) but it does raise several questions for the future.

The first and most immediate is why the plant is having to close next year rather than five years from now, but just as important is what can be done to help the community around the site recover. And the announcement raises one other important question that will affect us all: what does the closure mean for the future efficiency and security of Scotland's energy sector?

On the first question - the effect on the community - there is no doubt it will be profound and long-lasting. Longannet has been a major employer in Fife for 40 years and as well as the 430 staff on site, there are other businesses in the area that will notice the effect of the plant shutting down. The devastating effects of large industrial sites closing has been seen elsewhere in Scotland and the Scottish Government and Scottish Power must do everything they can to minimise the impact.

On the second question - why the plant is closing now - opinion is divided, rather predictably, along party lines. Tom Greatrex, the shadow energy minister, believes the Scottish Government has our energy mix wrong, leaving Scotland reliant on power from elsewhere when demand is high and the wind is not blowing. The Scottish Government and Scottish Power on the other hand blame the transmission charging regime in the UK which they say leaves Longannet having to pay more to hook up to the National Grid than other power stations of its kind in England.

Neither argument is the whole truth. Mr Greatrex is right that Scotland does sometimes have to import its energy (as reported in The Herald this week, in the three years from 2012 to 2105, Scotland relied on English power on one in five days). The closure of Longannet will also undoubtedly increase the pressure (on Boxing Day, the power station was providing 40 per cent of our electricity). But such figures have to be put in the bigger context and across the year Scotland still remains an energy exporter rather than importer.

The argument that the closure is down to transmission charges, as suggested by the Scottish Government and Scottish Power, also fails to entirely stack up. Yes, the charges paid by Longannet are much higher than a power station in the south of England would pay, but the SSE-run Peterhead power station, which beat Longannet to win a National Grid contract to maintain voltage in the electricity supply, faces the same charges and many of the same economic challenges. The transmission charges have certainly not helped Longannet's viability, but they alone do not explain why the plant is closing next year.

Much of the explanation for that lies in the changing energy sector and the role of coal power stations within it. Longannet would only have a future beyond 2020 if hundreds of millions was spent on technology to reduce and mitigate its harmful emissions and Scottish Power is not making that investment. There is also a broad and well-based consensus that coal-fired power stations have to be phased out as part of our move away from fossil fuels towards renewables.

The challenge for the Scottish Government is to develop a strategy for the years after the phasing out is complete and that will require hard decisions for a government that has imposed a moratorium on fracking and still refuses to countenance new nuclear power stations. With Longannet gone by next year and wind still not providing most of the power in Scotland, these controversial options must still be on the table as part of a balanced energy policy based on a rational mix of sources and focused on renewables. The Scottish Government is blaming transmission charges for the end of a power station, but it must now show leadership on what happens after its closure.