A preliminary reading by the national statistics agency on Wednesday showed that Mexico's economy, Latin America's second biggest, grew by 0.1 percent in the April-June period from the previous quarter, when adjusted for seasonal swings.
A Reuters poll of economists had forecast GDP would be flat compared with the first quarter, when the economy shrank by 0.2 percent quarter-on-quarter.
In unadjusted terms, the economy contracted by 0.7 percent from the same period a year earlier.
Economists generally define two consecutive quarters of negative GDP as a technical recession, though there is no established global definition for the phenomenon.
The government has rejected the suggestion that the country is in a slump, and President Andres Manuel Lopez Obrador on Monday was adamant that Mexico is not in recession.
Investor confidence in Mexico has been shaken by some of the decisions of Lopez Obrador, a leftist exponent of economic nationalism who took office in December vowing to reduce chronic inequality and deliver average annual growth of 4%.
In particular, his decision to cancel a partly built $13 billion new Mexico City airport and his retreat from the prior government's opening of the oil and gas industry to private capital have raised doubts about his economic credentials.
During the past few months, private and public sector analysts have pared back their Mexican growth forecasts, with some now predicting little expansion at all in 2019. Lopez Obrador said he expects growth of 2% this year.
The president has attacked critics of his policies as supporters of what he has characterized as a corrupt "neo-liberal" era that preceded his time in office.
However, he has also had to contend with the risk of economic disruption from the United States - the destination for around 80% of Mexico's goods exports - due to tensions with US President Donald Trump over illegal immigration.