MEXICO CITY—Mexico has stopped buying U.S. light crude oil under its new president, a decision that former government officials say has likely aggravated the country’s gasoline shortage crisis.

President Andrés Manuel López Obrador, who took office in December, triggered the monthlong crisis with a high-profile decision to shut off key pipelines, in an effort to thwart fuel thieves known as huachicoleros.

But...