In May, the country's new president, 38-year-old former journalist Carlos Alvarado announced the plan to ban fossil fuels during his inauguration speech.
"Decarbonization is the great task of our generation and Costa Rica must be one of the first countries in the world to accomplish it, if not the first," Alvarado told a crowd of supporters, the Independent reported.
"When we reach 200 years of independent life we will take Costa Rica forward and celebrate… that we've removed gasoline and diesel from our transportation," he promised.
Over 99 percent of Costa Rica's electricity is currently generated through renewable energy sources. However, achieving zero-carbon transport, one of any country's big environmental challenges, will be arduous.
According to Jose Daniel Lara, a Costa Rican energy researcher at the University of California-Berkeley, the complete elimination of fossil fuels in just a few years — the president's goal — is unlikely.
"A proposal like this one must be seen by its rhetoric value and not by its technical precision," Lara told the Independent.
Oscar Echeverría, president of the Vehicle and Machinery Importers Association, noted that speedily achieving 100-percent clean transport will be problematic because the required infrastructure does not yet exist.
"If there's no previous infrastructure, competence, affordable prices and waste management, we'd be leading this process to failure. We need to be careful," Echeverría said.
The demand for cars in Costa Rica is on the rise. According to 2016 data from the country's National Registry, there were twice as many cars registered as babies born in that year. In addition, the country's National Meteorological Institute revealed that 64 percent of the Central American country's emissions are from energy use and more than two-thirds of that can be attributed to the transport sector.
Costa Rica is nonetheless setting a powerful example to the rest of the world, regardless of how long it may take to wean its transport network off of fossil fuels entirely, according to Monica Araya, a Costa Rican sustainability expert and director of Costa Rica Limpia, an organization that advocates renewable energy and electric transport.
"Getting rid of fossil fuels is a big idea coming from a small country. This is an idea that's starting to gain international support with the rise of new technologies," Araya said.