TRIPOLI, Libya -- Jubilant Libyans marked a major step toward democracy after decades of erratic one-man rule, voting Saturday in the first parliamentary election after last year's overthrow and killing of longtime dictator Moammar Gadhafi.
But the joy over the historic vote was tempered by boycott calls, the burning of ballots and attacks on polling centers in Libya's restive east. It was the latest unrest in a chaotic transition that has exposed major fault lines in the oil-rich North African nation - the east-west divide and efforts by Islamists to assert power.
Lines formed outside polling centers more than an hour before they opened in the capital Tripoli, with policemen and soldiers standing guard and searching voters and election workers before they entered.
"I have a strange but beautiful feeling today," dentist Adam Thabet said as he waited his turn to cast a ballot. "We are free at last after years of fear. We knew this day would come, but we were afraid it would take a lot longer."
The election for a 200-seat parliament, which will be tasked with forming a new government, is a key milestone after a bitter civil war that ended Gadhafi's four-decade rule.
But the desert nation of 6 million people has experienced a rocky transition since Gadhafi was killed by rebel forces in his home city of Sirte in late October. Armed militias operate independently, refusing to be brought under the umbrella of a national army, and deepening regional and tribal divisions erupt into violence with alarming frequency.
Growing resentment in the east - which was the cradle of last year's uprising - over perceived domination by Tripoli in the west has threatened to tear the country apart.
Some easterners back a boycott of the election and on Saturday protesters torched ballot boxes in 14 out of 19 polling centers in the eastern town of Ajdabiya, said Ibrahim Fayed, a former rebel commander in the area.
On the eve of the vote, gunmen shot down a helicopter carrying polling materials near the eastern city of Benghazi, birthplace of last year's revolution, killing one election worker on board, according to Saleh Darhoub, a spokesman for the ruling National Transitional Council. The crew survived after a crash landing.
The violence continued Saturday, with protesters, some armed, attacking polling centers in the early hours in the eastern cities of Ajdabiya, Brega and Ras Lanouf, ransacking them and setting ballot papers ablaze.
Reflecting the lawlessness that has plagued the country since Gadhafi's ouster, protesters attacked a polling station in Benghazi only to be driven back by voters who fired their own weapons in the air, independent candidate Faiza Ali said.
"Enough with the bloodshed," she said.
Nouri al-Abar, the head of the election commission, told reporters in Tripoli that 94 percent of polling centers nationwide were open but acknowledged that "security conditions" prevented ballots from reaching some areas and ballots were destroyed in other cases. He did not provide further details.
The uprising against Gadhafi was inspired by the Arab Spring revolts that led to the successful ouster of authoritarian leaders in Tunisia, Egypt and later Yemen. But it morphed into outright civil war as armed rebels battled Libyan regime forces for months.
Islamist parties also have gained influence in Libya and other nations following the ouster of authoritarian regimes run by strongmen like Gadhafi and Egypt's Hosni Mubarak.
There are four major contenders in the Libyan race, ranging from the Muslim Brotherhood-linked party and another Islamist coalition on one end of the spectrum to a secular-minded party led by a Western-educated former rebel prime minister on the other.
Despite the divisions and unrest, the prevailing mood was one of triumph.
"We are celebrating today and we want the whole world to celebrate with us," Prime Minister Abdurrahim el-Keib said after he cast his ballot in Tripoli.
Voters flashed the V-for-victory sign as they entered polling centers. Motorists honked their horns as they drove past. Others shouted "Allahu Akbar," or "God is Greater," from their car windows.
"This is history in the making," 26-year-old medic Farid Fadil said. "We were ruled by a man who saw himself as the state."
The election lines brought together men, women in black abayas and children accompanying their parents. Some voters arrived at polling centers waving the Libyan red, green and black flag or wrapping it around their shoulders.
"The turnout is extraordinary," said Mohammed Shady, an election monitor. "Everyone is being very cooperative. They want the day to be a success and it will be."
Voters distributed sweets to mark the occasion and women hugged each other or sang as they waited in line. Others chanted "the martyrs' blood will not go in vain," a reference to the thousands of anti-regime rebels killed by Gadhafi's forces. Others held pictures of loved ones killed in last year's ruinous civil war.
"Look at the lines. Everyone came of his and her own free will. I knew this day would come and Gadhafi would not be there forever," said Riyadh Al-Alagy, a 50-year-old civil servant in Tripoli. "He left us a nation with a distorted mind, a police state with no institutions. We want to start from zero."
As he spoke said, a woman came out of the polling center ululating and flashing the purple ink on one of her fingers. The ink is used to prevent multiple voting.
Many in Libya's oil-rich east feel slighted by the election laws issued by the National Transitional Council, the body that led the rebel cause during the civil war and assumed power after Gadhafi's fall.
The laws allocate the east less than a third of the parliamentary seats, with the rest going to the western region that includes Tripoli and the sparsely settled south.
Flush with money, the Muslim Brotherhood's Justice and Construction party has led one of the best organized and most visible election campaigns, and is hoping to become a political force in post-Gadhafi Libya like the Islamists of Egypt and Tunisia.
Three other parties also are expected to perform well: Former prime minister Mahmoud Jibril's secular Alliance of National Forces, former jihadist and rebel commander Abdel-Hakim Belhaj's Al-Watan and the National Front party, one of Libya's oldest political groups, known for organizing several failed assassination attempts against Gadhafi.
The new parliament initially had two missions: to elect a new transitional government to replace the NTC and to name a 60-member panel to write the country's constitution. Each of Libya's three regions was to have 20 seats on the panel.
However, in a last-minute move, the NTC decreed that the constitutional panel will be elected by direct vote instead, leaving the parliament only with the task of forming a government and angering many candidates who campaigned largely on the basis of their role in overseeing the drafting of the constitution.
A Libyan woman dips her finger in ink after casting her vote in a polling center in the Old City of Tripoli, Libya, Saturday, July 7, 2012. Jubilant Libyan voters marked a major step toward democracy after decades of erratic one-man rule, casting their ballots Saturday in the first parliamentary election after last year's overthrow and killing of longtime leader Moammar Gadhafi. But the joy was tempered by boycott calls, the burning of ballots and other violence in the country's restive east. (AP Photo/Manu Brabo)
Libyan men look for their names on a voters list at a polling station in Tripoli, Libya, Saturday, July 7, 2012. (AP Photo/Manu Brabo)
A Libyan woman votes at a polling center in the Old City of Tripoli, Libya, Saturday, July 7, 2012. (AP Photo/Manu Brabo)
Libyan voters line up at a polling station in Benghazi, Libya Saturday, July 7, 2012. (AP Photo/Ibrahim Alaguri)
A Libya man chants revolutionary slogans while celebrating on election day in Martyrs' Square in Tripoli, Libya, Saturday, July 7, 2012. (AP Photo/Manu Brabo)
A Libyan woman holds a framed photograph of a person killed during the uprising while celebrating on election day in Martyrs' Square in Tripoli, Libya, Saturday, July 7, 2012. (AP Photo/Manu Brabo)
A Libyan man holds up his voter ID card at a polling station in Benghazi, Libya Saturday, July 7, 2012. (AP Photo/Ibrahim Alaguri)
An election official shows a man how to fill out a ballot at a polling station in Tripoli, Libya, Saturday, July 7, 2012. (AP Photo/Manu Brabo)
A Libyan woman votes at a polling station in the old city of Tripoli, Libya, Saturday, July 7, 2012. (AP Photo/Manu Brabo)
Libyan men hold their elections ID cards while celebrating election day in Tripoli, Libya, Saturday, July 7, 2012. (AP Photo/Manu Brabo)