MEXICO CITY — Mexican President Andrés Manuel López Obrador vowed on Monday to alleviate a medicine shortage in public hospitals, pledging to shop abroad for essential drugs if necessary and blaming the situation on companies upset about his crackdown on overpricing.

The government promised on Friday to release about $126 million (2.4 billion pesos) to help alleviate shortages at Mexican public hospitals. The head of the largest public health system resigned last week citing budget cuts, a complaint echoed by several hospital directors.

In its first budget in December, the government reduced funding for several ministries as it sought to centralize spending, fight public sector corruption and honor a campaign pledge to implement fiscal austerity.

López Obrador argues that the problems in healthcare are the result of his clampdown on overpricing that he says was rife in the health system under the last government, with a small group of companies benefiting from government purchases and charging excessive prices.

Health Minister Jorge Alcocer said at Lopez Obrador's regular morning news conference that the problem was not a shortage of money to pay for pharmaceuticals, but that some companies, which he did not name, had not responded to government tenders for drugs.

Previous governments acquired medicines through ten suppliers that provided 80% of the country's total drugs at premium prices, Lopez Obrador said at the news conference.

Last month, he said three Mexican companies would be excluded from future public tenders for medicine. Critics say that decision hit patient care.

"I ask citizens to help us, because we are cleaning the house, the pigsty that they left. It can be an inconvenience that some medicines are really unavailable, but the problem will be resolved, and the health service will be improved."

"We apologize for the inconvenience," he said.

López Obrador said if shortages continue, the government could seek medicines directly from overseas pharmaceutical companies, rather than from Mexican intermediaries.

Under the veteran leftist's administration, which took office in December, purchases have been centralized through the Finance Ministry, as part of a broader push to combat corruption, he said.

Alcocer backed up his points by saying that Mexico previously paid the most of any country in Latin America for antiretrovirals to treat almost 100,000 patients living with the HIV virus.

FOLLOW NBC LATINO ON FACEBOOK, TWITTER AND INSTAGRAM.