This study presents the potential role of thermal power generation in a future power system with high shares of variable generation while considering different sources of demand side flexibility such as heat pumps and heat storages in district heating, demand response from industries and electric vehicles. The study was carried out using a generation planning model combined with a unit commitment and economic dispatch model. The results from the planning model show a strong shift away from combined cycle gas turbines to open cycle gas turbines and gas engines as the share of wind power and solar photovoltaic increases. Demand side flexibility measures pushed this trend further. The results from the unit commitment and economic dispatch model demonstrate that the flexibility measures decrease the ramping frequency of thermal units, while the ramp rates of thermal units remain largely unchanged or increased. This indicates that the flexibility measures can cover smaller ramps in the net load more cost-effectively but that thermal power plants are still valuable for larger ramps. Impacts on emissions and electricity prices are also explored.