MEXICO CITY — Opposition members in Mexico’s Senate seized the speakers’ podium Tuesday to head off an attempt by the governing party to schedule a fast-track secret vote to uphold the firing of a key prosecutor.

The opposition called the vote an attempt by President Enrique Peña Nieto’s party to blunt an investigation into possible illegal campaign finances.

Pena Nieto’s administration once prided itself on building consensus in the Senate, but appeared willing to risk a conflict in a bid to uphold the firing of electoral crimes prosecutor Santiago Nieto. The administration says the prosecutor was fired for revealing parts of an ongoing investigation.

Pena Nieto’s Institutional Revolutionary Party, the PRI, tried to ram through a little-used provision that would allow senators’ votes to be kept secret in a session Wednesday on whether to uphold the firing.

But about two dozen senators from opposition parties demanded an open vote and refused to leave the podium, leading the Senate chairman to end Tuesday’s session and call for the body to reconvene Wednesady.

“There is no justification for a secret vote,” said Sen. Luis Sanchez Jimenez of the Democratic Revolution Party. “What you are doing is very serious: You are trying to get rid of a prosecutor who makes you uncomfortable and replace with one you are comfortable with.”

The prosecutor was investigating reports that Odebrecht, a giant Brazilian construction company that has acknowledged bribing officials across Latin America, may have given funds that wound up in the coffers of Pena Nieto’s 2012 presidential campaign.

The nonprofit group Mexicans Against Corruption and Impunity released a report based on banking records and published statements by a former Odebrecht executive suggesting that a top official of Pena Nieto’s campaign may have received $3.14 million from an Odebrecht front company. The campaign official, Emilio Lozoya, has denied that, saying he had no connection with the bank account mentioned in the investigation.

Odebrecht officials have acknowledged paying bribes to win government contracts in several countries in Latin America and they have acknowledged paying $10.5 million in bribes to officials of Mexico’s state-owned oil company, Pemex. Lozoya headed Pemex after Pena Nieto won the 2012 presidential elections, but resigned when the company ran into financial problems.

The controversy grew when Pena Nieto’s government decided Friday to fire Nieto, supposedly for violating agency rules by revealing information about an ongoing investigation, which is not a public record in Mexico.

Nieto had given an interview with a local newspaper in which he said there was an investigation and there was “information” suggesting Odebrecht may have paid money to an account linked to Lozoya.

Opposition parties said Nieto was fired because the Odebrecht investigation was embarrassing to the PRI and the president, and they vowed to fight the dismissal in the Senate, which has the power to reverse the firing.

The prosecutor has asked the Senate to reverse the decision, writing that there was no valid reason to fire him.

Pena Nieto acknowledged in a letter published Tuesday that he met several times with executives of Odebrecht from about 2010 to 2013. But his office wrote in a letter published by the newspaper Reforma that “no official of Odebrecht or its subsidiaries had any involvement in the campaign.”

The office said Pena Nieto met “with many businessmen, both Mexican and foreign, with investments in Mexico, among them Odebrecht and its subsidiaries.”

Mexicans Against Corruption and Impunity cited transcripts from a Brazilian investigation in which an Odebrecht executive said, “We accompanied the current President Enrique Pena Nieto and the PRI campaign full time.”