Dmitry Lovetsky, Associated Press
A woman examines a list of candidates during parliament elections in a polling station in Volnovakha, a village on the front line of fighting between Ukrainian government forces and rebels, eastern Ukraine, Sunday, Oct. 26, 2014. Ukraine headed to the polls Sunday to elect a new parliament, overhauling a legislature tainted by its association with ousted President Viktor Yanukovych.

KIEV, Ukraine — Ukraine voted Sunday to elect a new parliament, overhauling a legislature tainted by its association with ousted President Viktor Yanukovych.

The election is set to usher in a contingent of largely pro-Western lawmakers. President Petro Poroshenko's party has campaigned on an ambitious reform agenda and is expected to get the largest share of the vote, but there is a strong likelihood it will need to rule in a coalition.

While around 36 million people have been registered to vote, the election will not be held on the Crimean Peninsula, which was annexed by Russia in March, or in the eastern regions where unrest is still rumbling and armed pro-Russia separatist rebels have taken firm hold.

Nongovernment watchdog Opora estimates some 2.8 million people in the Donetsk and Luhansk regions in the east — more than half the potential 5 million voters there — will be unable to cast their ballot.

Tamara Shupa, a 62-year old retiree, said she hoped incoming lawmakers would put an end to the war.

"We are very tired of the war," Shupa said. "To bring about change, we need peace."

The election marks a closing chapter in the reset of Yanukovych's legacy. The former leader was deposed in February after months of sometimes violent protests sparked by his snap decision to put ties with the European Union on hold in favor of deepening trade relations with Russia.

The protests, which broadened into a mass uprising fueled by rage at the pervasive corruption seen as a leading cause of the country's economic sluggishness, culminated in snipers shooting dead dozens of demonstrators.

Andrei Voitenko, a 40-year old teacher casting his ballot at a school in the capital, Kiev, said a new parliament would have to work toward repaying the high price paid by his fellow Ukrainians.

"We are overhauling the government because Ukraine and Ukrainians have made a European choice," Voitenko said. "Now we need a new parliament to make a European future. We have drawn a line under our Soviet past."

Other parties expected to win seats in parliament include Prime Minister Arseniy Yatsenyuk's Popular Front and the Fatherland party of Yulia Tymoshenko. Another strong contender is firebrand nationalist Oleh Lyashko's Radical Party, which has commanded much public attention through lavish campaign spending.

The political forces with the best prospects in the vote all broadly share a pro-Western posture and have stated their ambition to promote the thorough reforms needed to reverse Ukraine's cataclysmic economic decline.

After voting at a polling station in Kiev, Yatsenyuk said that the time had come to "reset" parliament and government.

"This is a first tremendous and crucial step to make Ukrainian politics more clear, more transparent, more responsible and more accountable," he said.

Poroshenko visited the town of Kramatorsk, which was wrested from separatist control in July. Speaking at a polling station, he paid tribute to the efforts of soldiers that have been engaged in the last six months of fighting.

Voting later in the day in Kiev, Poroshenko said no major polling violations had been recorded.

"We are holding elections that correspond to all European democratic standards," he said.

Poroshenko said he regretted, however, that more than 25,000 troops serving in locations other than their place of official residence were unable to vote.

Ukrainian security authorities said border troops were fired upon Sunday by rebels in the Luhansk region.

Overall turnout had reached 40 percent by 4 p.m. local time (1400 GMT) with four hours remaining until polls closed.

Ukraine's woes have been compounded in recent months by a conflict against armed separatists on the border with Russia that has claimed the lives of more than 3,000 people.

The country has enjoyed close if often strained relations with Russia since gaining independence. The public mood has turned sharply against the leadership in Moscow, however, over what is widely seen as its direct role in fomenting separatist unrest.

"Russia cannot interfere with Ukraine. We will become part of Europe," said 30-year old economist Anton Rushailo, after voting in Kiev. "Sooner or later, we will join NATO, and today we are taking an important step in that direction."

The outgoing parliament was previously dominated by Yanukovych's Party of Regions, which had its main base of support in the heavily Russian-speaking industrial east.

Some supporters of the Party of Regions are seen as likely to back the Opposition Bloc party, which includes many former Yanukovych associates. It was unclear if it will be able to overcome the 5 percent vote threshold needed to enter parliament.

Igor Seleznev, a retired 65-year old economist, said he cast his ballot for Opposition Bloc as he believes it is the only party willing to resist the emerging pro-reform consensus.

"For now, I see only change for the worse. Standard of life is getting worse, we are at war with Russia and there is economic chaos," Seleznev said. "There should be people in parliament that speak truth to power."

In Volnovakha, a government-controlled town 60 kilometers south of the main rebel city of Donetsk, voting took place under heavy security presence. Sentiment in towns on the front wavers between fear and hope.

"Nobody wants what is going on now," said Nadezhda Eshtokina, a retiree in Volnovakha. "I think everything will be good with time and our grandchildren will live well and live like Europeans."

Associated Press reporter Mstyslav Chernov in Volnovakha, Ukraine, and Nataliya Vasilyeva in Donetsk, Ukraine, contributed to this report.