Polish Secretary of State Wladyslaw Bartoszewski Reuters/Kacper Pempel

WARSAW (Reuters) - Poland's ruling Civic Platform (PO) party has secured a surprising win in regional elections held last week, the state election commission said on Saturday, a result likely to further aggravate tension over the already contentious vote.

The official results, published after a vote count dogged by the failure of a new IT system, defied an exit poll which suggested that the largest opposition party Law and Justice (PiS) grabbed its first nationwide victory in nine years.

The center-right PO won 179 seats in provincial assemblies, or 33 percent of the total number of seats, the state election commission PKW said. The conservative block led by PiS came second, securing 169 seats.

The junior ruling coalition partner PSL, traditionally popular in the countryside, has won 159 seats, while the leftist SLD party secured 28 seats.

The commission, which did not give a percentage breakdown of the votes between parties, said 17.9 percent of the total number of votes to provincial assemblies were invalid.

The delay in publishing the results, caused by the failure of a piece of software intended to aid the vote count, led the election committee head to resign.

Also, earlier this week PiS called for a rerun of the elections, while President Bronislaw Komorowski dismissed the suggestion as the height of insanity.

Regional elections are held every four years to choose mayors, provincial assembly members and other local authorities. In 2010, PO won 30.9 percent of the votes, followed by PiS on 23.1 percent and the PSL party with 16.3 percent.