Saudi Arabia can transition to a 100% renewable energy system by 2040 including the integration of the power, desalination and non-energetic industrial gas sectors. Single-axis tracking PV and battery storage contribute the highest to the final LCOE of the system. By 2050, single-axis tracking PV accounts for 77% of the total electricity generation. Battery storage accounts for 44% of the total electricity demand. Desalination plants provide additional flexibility to the energy system. Through sensitivity analysis, it is found that decreasing the capex of desalination plants results in a decrease in battery storage output and ultimately the total system capex throughout the transition. However, the required SWRO capex decrease seems to be higher than possible, leading to a lower cost flexibility provided by solar PV and battery storage than possible by very low cost water storage. This is because the relatively more expensive SWRO desalination prefers baseload operation for total energy system cost reasons.