The move comes days after the Spanish hotel federation warned that hundreds of hotels faced imminent closure over the collapse of the British tour operator “if the government doesn't take immediate action”.
At a news conference, Reyes Maroto, the minister for tourism, said that Madrid would inject €300 million ($330 million) to “deal with the urgency of Thomas Cook's failure”.
The money is to go mostly to the Canary Islands and the Balearic Islands, which are among Thomas Cook's prime destinations.
Some 400,000 tourists booked for travel this winter to the Canary Islands and 300,000 booked to the Balearic Islands “are not coming because of the bankruptcy”, Maroto said.
Up to two thirds of the total funds are to go towards loans to tourism companies to make up for the shortfall from bills now left unpaid by Thomas Cook.
There are also plans to lower air travel taxes to encourage airlines to rapidly fill the gap left by the British company as the Spanish holiday islands are hugely dependent on air travel.
Other measures include a tax holiday for tourism workers, help with tourism marketing efforts, and legal assistance for companies hit.
Maroto did not say whether there were any plans to sue Thomas Cook in British courts.
Thomas Cook was Spain's second biggest tour operator, flying more than seven million visitors to the country in 2018, the minister said.