MEXICO CITY (AP) — Mexico's treasury secretary resigned Tuesday, complaining of the appointment of unqualified officials by "influential people in the current administration who have clear conflicts of interest."

Carlos Urzua, a longtime ally of President Andrés Manuel López Obrador, did not specify who he meant. But his resignation letter suggested that ideology might be involved.

Urzua wrote that economic policy should be "free of extremism, whether that be right or left," but said "that belief was not reflected" by the administration. He also accused López Obrador of making policy decisions "without sufficient justification."

Urzua's resignation came at a sensitive time for López Obrador, who faces threats of tariffs from the United States and downgrades from credit rating agencies.

López Obrador said he had accepted Urzua's resignation, but did not respond to the accusations. He acknowledged Urzua had not agreed with some decisions, and noted: "We cannot continue with the same strategies. You cannot put new wine in old bottles."

The president appointed Assistant Treasury Secretary Arturo Herrera to replace Urzua and said his job would be "to create wealth, in order to distribute wealth."

Herrera served as chief of finances for López Obrador when he was Mexico City mayor in the early 2000s and has also worked for the World Bank.

Herrera said he did not know what problems Urzua was referring to in his resignation letter. He pledged to continue with plans for primary government budget surpluses in all the remaining five years of the administration, and pledged to preserve macroeconomic stability and confidence in financial markets.

Some observers speculated Urzua had been angered by Lopez Obrador's insistence on spending money on pet projects, like building a new oil refinery and renovating others.

But Herrera said the bulk of new investments at the state-run oil company, Pemex, would be in exploration and production, to reverse falling oil output. "We will continue to support Pemex," he said.

Herrera also dismissed speculation that Mexico might be heading into a recession.

López Obrador has sought to appease the business community, but has also drawn criticism for pushing ahead on costly pet projects and canceling a partly built Mexico City airport.

The president has gone on an unceasing austerity drive to reduce spending on government salaries, but has also created a series of new direct-grant cash payment programs for youth scholarships and training programs and has expanded payments for the elderly.

He has also embarked on ambitious infrastructure projects like the Maya Train, to connect tourist resorts and pre-Hispanic archaeological sites on the Yucatan Peninsula.

Alfredo Coutino, Latin America director at Moody's Analytics, said one of the big fears is that López Obrador's social programs and building projects could hurt the government's drive to avoid budget deficits.

"He has promoted the main infrastructure projects. The question is does he have the money to finance those projects or not," Coutino said. "Where's the money coming from for all these social programs? I think that one of the pressures that Carlos Urzua had was that we don't have money to finance all these social programs."

Coutino said Urzua had provided some confidence for investors, and his resignation roiled markets, with stocks dropping about 1.6 percent and the peso falling about 1.4%, to 19.16 per $1.

"It's a big shock," he said. "The main question is this going to be just a transitory negative event, or is it going to the beginning of pieces falling apart."

López Obrador has said that savings from the government's spending cuts and an anti-corruption campaign would pay for the projects, along with some private financing.

The president has sought to improve debt-ridden Pemex's financial footing, and reduce the amount of money Pemex loses through fuel theft from illegal taps drilled into pipelines. But experts say the new refinery project make little sense.

Last month, Fitch Ratings downgraded Mexico's long-term foreign currency and local currency issuer default ratings, citing Pemex's continued deterioration and the country's continued weak economic outlook. It said actions taken so far by the government to prop up Pemex were not sufficient to stop the company's decline.

Moody's lowered the country's economic outlook to negative from stable in June. And on Tuesday, Moody's reduced its forecast for the economy's growth to 1.2% for the year, down from 2% the previous year.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.