(Adds Maduro, Lopez quotes)
By Diego Ore and Andrew Cawthorne
CARACAS, April 8 (Reuters) - President Nicolas Maduro's government and Venezuela's main opposition group agreed on Tuesday to begin talks intended to halt the nation's worst political unrest in a decade.
Representatives of the Vatican and South American regional bloc Unasur will mediate, both sides said.
Clashes between security forces and pro-government militants on one side, and hooded opposition demonstrators blocking streets on the other, have killed 39 people since mid-February, according to official figures.
The dead have included government supporters, opponents, and members of the security forces.
Maduro, the 51-year-old successor to Hugo Chavez, led the government team at Tuesday's preliminary talks that were the first sit-down with the Democratic Unity (MUD) opposition coalition since the troubles began.
"We spoke frankly, directly and respectfully. There were moments of tension, but we agreed to start a cycle of meetings," Maduro said after the meeting in a 17th century colonial building that houses the foreign ministry.
"Neither will we try and convert them to Bolivarian socialism nor will they convert us to capitalism," he said, using a reference to Venezuelan independence hero Simon Bolivar.
The formal talks are set to begin on Thursday.
On the agenda will be Venezuela's crime epidemic and economic problems - issues high on the litany of complaints from demonstrators in the streets since early February.
The opposition is also insisting on the release of jailed protest leader Leopoldo Lopez and dozens of imprisoned students.
Tuesday's meeting, brokered by visiting Unasur foreign ministers, may take some heat out of a crisis that has also caused hundreds of injuries and arrests, and proved a further drag on Venezuela's ailing economy.
But they may disappoint hardliners in the opposition, who had been hoping to inspire a "Venezuelan Spring" and view Maduro's exit as the only solution.
MUD leader Ramon Guillermo Aveledo said the opposition would ensure that students, who have led the wave of protests, would not be forgotten in the talks.
"We have agreed to the presence of a third party who will help us in this difficult path," he added, referring to the probable involvement of a Roman Catholic Church official.
From jail, Lopez called for a continuation of peaceful protests and expressed skepticism over the incipient talks.
"I believe deeply in dialogue, but in a dialogue of equals, not (with one side) on its knees. For 15 years, we have seen how the dictatorship conducts dialogue," he said in a series of messages posted by his wife on Twitter.
Though there have been no new fatalities for several days, clashes have continued on the streets of Caracas and some other hotspots such as the western city of San Cristobal.
While the students have failed to bring millions of protesters out as they had hoped, they have shown persistence in building barricades on streets and using other nuisance tactics.
Some have been posing naked on social media to protest against the beating and stripping of a student during a melee last week at a university in Caracas.
Maduro accuses the protesters of trying to promote a coup against him similar to a brief toppling of Chavez in 2002. (Editing by Lisa Shumaker and Ken Wills)
Our Standards: The Thomson Reuters Trust Principles.