CARACAS - Venezuela's embattled government and opposition leaders have agreed to hold talks to defuse a growing political crisis, but mistrust lingers after an attempt to recall the president was scuttled.

With the mediation of the Vatican and the Union of South American Nations, the two sides agreed after hours-long talks which ended before dawn on an agenda that includes a new meeting next month.

But opponents of socialist President Nicolas Maduro remained wary while the opposition itself is divided over the strategy, with some groups refusing to sit down with the government.

"Whether this dialogue has or doesn't have continuity will depend on concrete gestures from the government," said Jesus Torrealba, executive secretary of the Democratic Unity Roundtable (MUD), the opposition group taking part in the talks.

"The opening of this dialogue doesn't mean by a long shot that the struggle will stop."

But Torrealba suggested that the opposition could reconsider holding a planned protest on Thursday in front of the Miraflores presidential palace.

In a sign that it is apparently serious about the talks, the government on Monday night released five opposition members who had been imprisoned.

However, none were high-profile and the opposition maintains there are 100 "political prisoners" in Venezuela.

Seated at a museum on the outskirts of Caracas as the talks began late Sunday, Maduro expressed his "total and absolute commitment to dialogue."

He met Monday with senior US diplomat Thomas Shannon, who had traveled to Venezuela to back the political dialogue. The two had a "very positive" conversation about the start of the talks, the Venezuelan president said. The US government has had difficult relations with Venezuela dating back to the late leftist icon Hugo Chavez. "(Shannon's) visit will underscore our support for the ongoing dialogue process, and our interest in the well-being of the Venezuelan people," the State Department said.

The MUD demands that the government release jailed opposition leaders and revive the recall referendum process or organize early elections. The government has denied that the jailed opponents are political prisoners and warns that it will not let itself be toppled.

The two sides will meet again on November 11 in Caracas.

Before that, each will work separately on issues including respect for the rule of law; justice, human rights and reconciliation; the social and economic crisis; and the thorny election issue.

But one of the main opposition parties, the Popular Will, led by its jailed leader Leopoldo Lopez, and 14 other political groups stayed away from the process, saying conditions for the talks had not been met.

In October electoral authorities halted a drive to hold a recall referendum against Maduro.

The Vatican could play a key role in easing tensions.

"I don't believe Maduro, not even on good days. They are devils capable of anything. But I do trust Pope Francis," said former opposition presidential candidate Henrique Capriles.

Analysts warn that the government may just be trying to buy more time while the opposition risks further internal divisions.

"We have very little time to generate trust in the dialogue. The magnitude of the crisis is far-reaching," said political scientist and sociologist Francisco Coello.

"The desperation in the street is very high," he said, referring to the country's deep economic crisis.

A recent poll found that more than 75 percent of Venezuelans disapprove of their deeply unpopular president, Chavez's handpicked successor.

But another analyst, Luis Vicente Leon, said that, if the opposition was not sure it could mobilize people massively on the street, its best bet was to negotiate.

Maduro's opponents blame him for an economic crisis that has caused food shortages and riots in the oil-rich country.

The opposition has vowed to use their majority in the legislature to declare that the leftist leader has "abandoned his post" and has threatened to subject him to a political trial.

Maduro has responded by threatening to throw his political enemies in jail, accusing the opposition of trying to overthrow the government through "unconstitutional and undemocratic means."

Venezuela has the world's largest oil reserves, but is suffering a deep economic crisis sparked by falling crude prices.

The International Monetary Fund estimates inflation will hit 475 percent this year.