Fifteen Mexican states held elections on Sunday. Reuters

It's a tale of two winners. Elections in the Mexican state of Baja California, which borders with the United States and is considered the most important among 15 elections for state government in the country, did not produce a clear winner, with both leaders from the Partido Revolucionario Institucional (Revolutionary Institutional Party, or PRI, and current governing party in the country) and the Partido Acción Nacional (National Action Party, or PAN) announcing wins at almost the same time.

First it was César Camacho, national leader of the PRI, who proclaimed fellow party member Fernando Castro Trenti as the new governor of Baja California. Barely minutes later, his counterpart in PAN Gustavo Madero announced his party’s candidate, Francisco “Kiko” Vega, as winner, as reported by CNN Mexico.

Both parties started celebrating their triumph at midnight, and actual results did not come until 6 a.m. Central Mexico time (7 a.m. EST). By then, with 95 percent of votes counted, the PAN had 47.15 percent, and PRI 44.14 percent.

PAN, which formed a coalition with Partido Revolución Democrática, was then formally declared the winner, with Kiko Vega becoming new governor of Baja California. This win represents a big blow to Mexico’s President Enrique Peña Nieto’s party, since the state was the first to give leadership to the opposition back in 1989, when PAN won a state election for the first time, intiatiting the process that would end decades of PRI rule.

The PRI still has to recognize the loss publicly, which will be a bitter pill to swallow after prematurely claiming a win. The party said it will wait until the official recount, which will start on Wednesday and will not be announced until Sunday.

Baja California was not the only state to go for the opposition. Puebla, the Mexican state with the highest number of voters, gave its government to PAN too, which 51 percent of votes against 38 percent to PRI, reported Mexican newspaper El Universal.

PRI leader Ivonne Ortega admitted prior to the elections that Baja California and Puebla were priorities for her party. This double blow could mean that the ruling party might be in trouble come national elections in 2018.

The controversy happened amidst a general climate of violence that surrounded the elections across the country. In Veracruz, PRI candidate to the mayor’s office Rosita Martínez was arrested, accused of trying to buy votes. In Cancun, 44 people were also arrested under charges of tampering with the election. Oaxaca saw the burning of ballots, and in Puebla, over 20 people stole electoral material from a voting booth.