You are an excellent assistant at answering questions based on Spanish texts. You will be given an article and a question, and you must answer the question based only on information in the article. The response should be extracted from the context verbatim.

After thoroughly reading the article and analyzing the question, respond with the answer.

Title:
Portugal

Context:
Portugal’s national energy transmission company, Redes Energéticas Nacionais (REN), uses sophisticated modeling to predict weather, especially wind patterns, and computer programs to calculate energy from the various renewable-energy plants. Before the solar/wind revolution, Portugal had generated electricity from hydropower plants on its rivers for decades. New programs combine wind and water: wind-driven turbines pump water uphill at night, the most blustery period; then the water flows downhill by day, generating electricity, when consumer demand is highest. Portugal’s distribution system is also now a two-way street. Instead of just delivering electricity, it draws electricity from even the smallest generators, like rooftop solar panels. The government aggressively encouraged such contributions by setting a premium price for those who buy rooftop-generated solar electricity.

Question:
Through what renewable resource had Portugal generated electricity before the solar/wind revolution?

hydropower plants on its rivers