Powering entire countries (especially smaller ones) without fossil fuels is possible. In 2016, Costa Rica’s electrical grid mainly used renewable energy, the Costa Rican Electricity Institute (ICE) stated in a Jan. 3 press release. The country went 271 days using only renewable-energy production.

Costa Rica produced 10,778.32 gigawatt-hours between Jan. 1–Dec. 31, and 98.1 percent came from renewable sources. Fossil fuels made up the remaining 1.9 percent.

This is down slightly from 2015, when Costa Rica used 98.9 percent renewable energy. However, this is the second time in two years that the country ran for more than two months on only renewable energy. In comparison, almost 15 percent of the electricity supply for the United States, from January through October 2016, came from hydroelectric, wind, solar and other renewable power sources, according to the U.S. Energy Information Administration. Coal and natural gas made up almost two-thirds of the electricity generation during that period, and the remaining 19 percent was nuclear power.

Most of Costa Rica’s electricity—80.27 percent of total electricity produced in August, according to Science Alert—comes from large hydropower facilities, fed by rivers and seasonal rains. The rest of the country’s energy is produced by geothermal plants (12.62 percent in August) and wind turbines (7.1 percent).

A small but growing share of electricity in Costa Rica comes from biomass and solar power (0.01 percent in August). Diesel-burning power plants also contribute, but the country hasn’t used them much since 2015.

Reventazón, a new hydroelectric project run by ICE that became fully functional in September, offers added hydroelectric power. The dam’s five turbines have the capacity to generate 305.5 megawatts, which is enough to power 525,000 homes, according to the Tico Times.

Costa Rica’s smaller economy and abundant natural resources give it the advantage over larger, energy-guzzling countries. Costa Rica is half the size of Kentucky and generates 373 times less electricity than the United States.

ICE President Carlos Manuel Obregón said he expected renewable-energy generation to remain stable in 2017, partly due to the country’s four new wind farms.