Mexico's main political parties have agreed to abide by the electoral rules in a close-run presidential race.
The candidates have stepped up the intensity of their campaigns
The parties signed a pact, promising to conduct the rest of the election campaign in a more civil manner and to respect the results of the 2 July poll.
Front-runners Andres Manuel Lopez Obrador and Felipe Calderon have strongly attacked each other.
Financial markets are worried that the vicious campaign could make Mexico difficult to govern after the election.
The presidential race is extremely tight, with Mr Lopez Obrador of the Democratic Revolution Party (PRD) and Mr Calderon of the governing National Action Party (PAN) running neck-and-neck in the opinion polls.
The candidates have stepped up their offensive in recent weeks as election day approaches.
Opinion polls show split support for Calderon and Lopez Obrador
The electoral authorities have ordered aggressive television advertisements from the two sides off the air, deeming them libellous.
The parties have now promised to abide by a "civility pact" and follow regulations set out by the Federal Electoral Institute.
Correspondents say this may ease concerns in the financial markets that there could be political gridlock and mass protests if Mr Lopez Obrador were to dispute an unfavourable result.
The accord also calls on President Vicente Fox to refrain from commenting on the election.
He has been accused of interfering in the campaign on behalf of Mr Calderon, his party's candidate.
At a ceremony to sign the pact, the parties could not resist sniping at one another, Reuters reports.
"The big challenge the Mexicans have in the 2006 electoral process is ...to avoid the political transition from failing and a return to state authoritarianism and irresponsible, demagogic populism," PAN chairman Manual Espino said.
"We reject all kinds of populism", the head of the PRD, Leonel Cota, said, "particularly the populism of the right."
President Fox's victory in 2000 ended 71 years of rule by the Institutional Revolutionary Party (PRI) which was often involved in rigging the result to keep its grip on power.