MEXICO CITY — When does a gasoline shortage, with lines around the block and closed service stations, feel like a lucky break?

When you're an automaker trying to sell hybrids and electric vehicles to a curious but skeptical public.

Automakers haven't had that kind of luck in the U.S. for more than a decade. But in Mexico, recent fuel shortages — combined with rising prices for imported gasoline and smog alerts that ban cars from the road unless they have green credentials — are spurring interest in their growing lineups of alternative-fuel vehicles.

The latest crisis, or opportunity, was triggered when President Andrés Manuel López Obrador, who took office Dec. 1, surprised the nation at the start of the year with the closure of state-owned fuel pipelines to combat illegal gasoline and diesel taps that siphoned off billions of dollars a year in fuel.

But in shifting those deliveries to tanker trucks, López Obrador created a bottleneck in the distribution of gasoline to major cities, including the capital. For at least two weeks, motorists had to queue for hours to buy fuel.

The struggle at the pumps coincided with the introduction of Toyota's new-generation RAV4 hybrid, along with gasoline models, last week.

Already, much of Toyota's growth in Mexico has been because of sales of its Prius, which paved the way for other hybrid models, including the Prius C and Camry.

"In recent days, the number of people going to dealerships asking about hybrid models has almost doubled," said Guillermo Díaz, director of operations for Toyota Motor Sales de México. "People who might not have been thinking about buying a hybrid are at least asking about the various models," he said.