This paper analyzes the economic potential of Power-to-Gas (PtG) as a source of flexibility in electricity markets with both high shares of renewables and high external demand for hydrogen. The contribution of this paper is that it develops and applies a short-term (hourly) partial equilibrium model of integrated electricity and hydrogen markets, including markets for green certificates, while using a welfare-economic framework to assess the market outcomes. We find that strongly increasing the share of renewable electricity makes electricity prices much more volatile, while the presence of PtG reduces this price volatility. However, a large demand for hydrogen from outside the electricity sector reduces the impact of PtG on the volatility ...