MEXICO CITY (AP) — Treasury Secretary Jose Antonio Meade declared Monday his intention to be the presidential candidate of Mexico's ruling Institutional Revolutionary Party, the first time a non-PRI member has sought to run on the party's ticket.

Meade resigned from his Cabinet post earlier in the day, saying he was running as a PRI candidate in hopes of achieving "a country where families always have food on the table."

Supporters of the long-ruling party quickly rushed to back Meade's bid despite his outsider status in what appeared a carefully organized effort to quash any internal discontent over his candidacy before party leaders formally name PRI's candidate for the July 1 election.

"We want you to be our candidate," said Carlos Aceves of the Mexican Workers Confederation, which functions more as a wing of the PRI than as an independent union group.

Meade told cheering union officials, "I want you to accompany me in my wish to make Mexico a great power, and for Mexicans that means food, sustenance, housing and better opportunities."

He also quickly picked up the support of the party's farm sector amid drum beating and chants of "We are going to win!"

The exuberant endorsements came even though as a technocratic, Yale-educated economist, Meade has been fairly distant from farm and labor groups. Critics said the carefully staged shows of support recalled the "dedazo" — literally the hand-picking of candidates by the outgoing president that has been a tradition in the PRI for decades.

"The return of the 'dedazo' in all its splendor," tweeted Margarita Zavala, a former first lady who is running as an independent in 2018. "This ritual ... takes us back in time 25 years. In the 21st century, this is shameful."

President Enrique Pena Nieto did not mention Meade's candidacy at a ceremony in which Jose Antonio Gonzalez, the current head of the national oil company Pemex, was tapped to replace Meade at the Treasury Department. Current Pemex financial chief Carlos Trevino will take over the top spot at Pemex.

But Pena Nieto did say of Meade, "I wish him luck in the project he has chosen to undertake."

If Meade is selected as a PRI candidate by a party congress before the Feb. 18 deadline, it would be the first time the party has ever backed a presidential run by someone who was not a party member.

But the PRI has seen its standing in opinion polls slide, battered by a falling peso and U.S. President Donald Trump's jibes at Mexico. That likely prompted the party's turn to an outsider, knowing most Mexicans now say they wouldn't vote for the PRI.

Meade, 48, who has no formal membership with any political party, has crossed lines as a non-partisan technocrat before. He served as foreign relations secretary and head of the social development department under Pena Nieto, and he was energy secretary under former President Felipe Calderon of the conservative National Action Party.

Foreign Secretary Luis Videgaray showered praise on Meade last week, saying that "under the leadership of Jose Antonio Meade, Mexico today has stability, a defined course and clarity in economic policy decisions."

Meade helped rein in the government's troubling budget deficits, but he has also presided over high inflation that runs at about 6.4 percent a year and weak economic growth, including a drop in GDP of 0.2 percent in the most recent quarter.

As a former foreign secretary, Meade would have inside knowledge on dealing with the Trump administration, especially U.S. threats to withdraw from the North American Free Trade Agreement, which is vital to Mexico's economy.

But if Mexico has to cede ground on things like greater U.S. content in autos, the Pena Nieto administration and Meade could suffer.

"We will be hurt regardless of the deal struck, and we will be hurt if no deal is struck," said Federico Estevez, a political science professor at the Autonomous Technological Institute of Mexico. "They'll get blamed for this whatever way it plays."

The PRI is so weak in the polls that it recently changed its internal rules precisely to allow non-party members to run for public office. In the past, being a candidate meant climbing through PRI ranks and proving one had support from its various wings, like farm and labor groups. Party members will still have to submit proof of such support, but under rules apparently tailor-made for Meade, "sympathizers" won't have to meet those standards.

The PRI, which ruled Mexico for seven decades through 2000 and regained the presidency in 2012, won't formally register candidates until Dec.3, and won't formally name the presidential nominee until Feb. 18.

It is possible Meade could run unopposed for the PRI's nomination. But it is also possible that support for his candidacy from PRI's elite could cause dissent and even desertions among PRI members who feel passed over.

"You can be assured that Meade won't be out there saying anything that's too dramatic, just to be a steady hand on the tiller," Estevez said. "There's a storm coming. You want a technocrat to steer you to safe harbor as quickly as possible. That's all he's offering.

"That's a hard one to sell, you know, because he's the one responsible for leading us into the storm, as far as his opponents see it, and that's the way they'll play it."