India's Supreme Court has cancelled almost all the coal mining licences awarded by the government since 1993 in a corruption scandal which has cost the country tens of billions of dollars.
The court scrapped 214 of 218 licences awarded from 1993-2010 after finding they had been awarded illegally.
The four units allowed to continue are linked to major state power projects.
In 2012, federal auditors said India had lost $33bn (£20bn) because coalfield rights were sold off cheaply.
Last month, the Supreme Court said the licences were illegal since they had been allocated in a manner which was "not fair and transparent" and without competitive bidding.
"The court has cancelled all the allocations except four," Attorney General Mukul Rohtagi told reporters outside the court on Wednesday.
Of the 214 cancelled licences, 168 relate to fields where work had yet to begin. They have been ordered to shut with immediate effect, Mr Rohtagi said.
The remaining 46 coalfields - where some work had begun ahead of actual mining - had been given six months to wind down their operations, he added.
After six months, the government is free to hold new auctions for all the cancelled coal field permits, the court ruled.
The order sent shares of firms like Jindal Steel and Power and Hindalco, that have spent billions of dollars on projects around coalfields, tumbling.
India is one of the largest producers of coal in the world and more than half of its commercial energy needs are met by coal.
A BBC correspondent in Delhi says coal mines allocated before 1993 will continue to operate, but Wednesday's ruling has major implications for the country's energy sector where demands are constantly growing.
In its 2012 report into the sale of coalfields, federal watchdog the Comptroller and Auditor General (CAG) had said that private and state companies had benefited from the allocations.
Opposition politicians accused the then Congress government of "looting the country" by selling coalfields to companies without competitive bidding.
But the Supreme Court ruling has implications for most of India's main political parties which governed India between 1993 and 2010, including the current Bharatiya Janata Party (BJP)-led government.
Correspondents say mining became a source of massive corruption after India opened up mining to private companies without strong and independent regulation.