TRIPOLI/BENGHAZI, Libya (Reuters) - Hundreds of Libyans handed in weapons left over from last year's war on Saturday, part of a drive by the North African country to rid its streets of arms and crack down on rogue militia groups.

As the day went on, a trickle of people turned into longer lines in Tripoli and in the eastern city of Benghazi, where tents were set up in squares for military officials to collect arms, explosives and even rocket propelled grenade launchers.

Amid a celebratory atmosphere, women and children looked on as men queued to turn over their weapons as they listened to a military marching band and pop music.

"We want our country to be safe and secure ... We don't want to see weapons anymore," Tripoli resident Mohammed Salama said, as he stood in line to hand over a rifle.

"We want to live our lives. The time of war is over."

Libya's new rulers have struggled to impose their authority on a country awash with weapons, and many Libyans are fed up with militias, formed during the war but which still patrol the streets and often take the law into their own hands.

A September 11 attack on the U.S. consulate in Benghazi, in which the U.S. ambassador and three other Americans were killed, was followed by anti-militia protests in the city last week, increasing pressure on the authorities to tackle insecurity.

The government has since taken a twin-track approach - vowing to dissolve rogue militias that operated without official government permission, but also offering public backing to many of the most powerful armed groups, which have official licenses to operate, as it seeks to build stronger security forces.

Saad Bakar, head of a small brigade in Benghazi, handed over rifles and ammunition on Saturday, saying he was ready to disband his group.

"We were waiting until today to make sure that the weapons go to the right place," he said. "We want to join the army as individuals."

STEP FORWARD

In Benghazi, an organizer said more than 800 people had been registered as having come to the collection point. In Tripoli, an army official did not give an exact figure but said the number had superseded expectations of around 200 people.

One participant said he had even heard that a tank had been handed over.

Those numbers suggest a fraction of the arms that spilled out of Muammar Gaddafi's arsenals have been handed over but the initiative is seen as a step forward in a country where many still keep their weapons citing a precarious security situation.

"I want to live in a peaceful place where only the police and army have arms," Benghazi businessman Ibrahim Ali said after handing over a machine gun.

But he said he would still keep hold of his rifle for now. "When I can call the police and they are able to arrive quickly, then I can give them that weapon," he said.

The collection drive is a collaboration between the army and a private television station which drummed up support through live broadcasts from Tripoli and Benghazi.

Organizers in both cities, who said the event would be repeated in other cities, planned to raffle off prizes, including cars at the end of the day-long collection.

"Libyan people need stability ... They are handing over weapons to the military so that they are kept in the right place and not on the streets," said Yussef al-Mangoush, the army's chief-of-staff. "This is the beginning, we began this in Tripoli and Benghazi. We will go to other cities."

Mohammed Arusi, a 58 year old engineer who was queuing to hand over a rifle in Tripoli, said he was satisfied the security situation was changing for the better.

"It's not like before, the army is getting stronger," he said. "You cannot buy safety, you have to feel safe. And I feel safe right now." (Additional reporting by Ali Shuaib and Ayman al-Sahli in Tripoli and Omar al-Mosmary in Benghazi; Editing by Andrew Osborn)