The PRI lost Mexico City for the first time, to the social democrat Cuauhtemoc Cardenas, and appeared to have lost its majority in the Chamber of Deputies, traditionally a rubber-stamp for the President.
With only a quarter of the 128 Senate seats at stake, the PRI, which has won the presidency since the party was founded in 1929, retained control of the upper house. But it also appeared to have lost two of the six state governorships at stake to the conservative National Action Party (PAN).
With most results in, the PRI, which grew out of the disarray which followed the 1910-17 revolution, had won only 36 per cent of the nationwide vote for the 500-seat lower house and only 25 per cent in the race for mayor of the capital. In the latter, a hotbed of discontent over the economic crisis which began in 1994, Mr Cardenas swept into the nation's second most powerful job with about 46 per cent of the vote.
The PAN was scoring about 28 per cent nationwide and Mr Cardenas's Party of the Democratic Revolution (PRD) 26 per cent. The PRI has always held the presidency. It long held all 31 states but, increasingly unable to perpetrate its traditional fraud, it now appears to have lost a total of six of the 32 states to the PAN over the past decade.
"The new epoch," said the headline to a front page editorial by Nobel prize-winning author Octavio Paz in yesterday's daily Reforma. "Yesterday, Mexico awoke to a new reality - democracy," said another editorial in the same paper. "Change is in the air and it was high time," commented the English-language Mexico City Times.
The elections appeared to be the cleanest and most peaceful in Mexican history. In an unprecedented atmosphere of respect among the major parties, President Ernesto Zedillo, whose six-year term ends in 2000, offered "sincere congratulations" to Mr Cardenas and promised co-operation between the federal government and Mexico City's new administration.
Both Mr Cardenas and likely PAN candidate Vicente Fox, governor of the state of Guanajuato, both now appear to have a respectable shot at the presidency in 2000. The PRI, which has long controlled not only government but the military, police, judiciary, trade unions and peasant groups through a web of patronage and coercion, is in disarray.
Some analysts fear its crumbling could trigger renewed internal warfare between its traditional "dinosaurs", the old guard, and the younger and more open-mind "babysaurs", including President Zedillo, who realise the party must make concessions towards full democracy. Some even fear military intervention - the generals have always been close to the ruling party - if the moderates make too many concessions.
A few analysts expressed a certain cynicism over Mr Cardenas's victory, saying the PRI appeared to have almost let him win. According to their theory, the ruling party believes a certain popularity for Mr Cardenas will help offset the growing PAN threat. In addition, with the federal government controlling the capital city's budget and the President allowed to name the city's police chief, the hands of the new mayor, who takes office in December, will be tied.
In his editorial, Octavio Paz warned that if Mr Zedillo and Mr Cardenas do not co-operate, Mexico City, with its population of 20 million and growing, "could become a source of political instability. And we know that instability borders on two twin dangers that can ruin a democracy - anarchy and force".