MEXICO CITY — A cussing rancher known as El Bronco, who made the first serious run for governor as an independent candidate in Mexico, trounced his competition in midterm elections, according to preliminary official results on Monday, in a race closely watched as a sign of voter frustration with entrenched, established parties often seen as ineffectual and corrupt.

The candidate, Jaime Rodríguez Calderón, running for governor of Nuevo León State, a business and industrial hub near the Texas border, received 49 percent of the vote. He defeated his closest rival, a candidate from the governing Institutional Revolutionary Party, known as the PRI, by 25 percentage points.

But the insurgent electoral mood in Nuevo León was not reflected on the national level in Sunday’s elections. Though the PRI lost some seats in the lower house of Congress, it will retain its narrow majority there with the help of two victorious allied parties. The PRI also won five of nine races contested for governor, losing two states it had held but picking up two others while holding onto three states, two of them by narrow margins.

With about 47 percent of those eligible going to the polls, a higher than normal level of participation, voters’ results showed their frustration with the governing party after months of scandals and sensational violence in pockets of the country. But they also illustrated a lack of faith in the traditional political opposition, whose two main parties — the conservative-leaning National Action Party and the leftist Party of the Democratic Revolution — have endured internal strife and have failed to capitalize on the PRI’s woes.