The opposition had earlier vowed to fight what it called Maduro's "dictatorship" as it embarked on a new strategy to oust him
Venezuela's government and opposition agreed Monday to launch talks in the hope of settling the political crisis in a volatile country stricken by food shortages.
The national dialogue aims to calm tensions after the opposition accused socialist President Nicolas Maduro of trampling on democracy by blocking their bid for a vote on removing him.
Months of tension were threatening to boil over after authorities enraged the opposition last week by annulling their drive for a recall referendum.
With the opposition vowing mass street protests as analysts warned of an increased risk of violent unrest, the Vatican stepped in on Monday.
Papal envoy Emil Paul Tscherrig joined a meeting in Caracas of government and opposition representatives and announced afterwards they had agreed to launch formal talks.
Maduro meanwhile received a private audience at the Vatican with Pope Francis.
"I thanked him in the name of Venezuela for all the support, so that at last, definitively, a formal dialogue could be started in Venezuela between the opposition and the legitimate Bolivarian government that I lead," Maduro said in televised comments afterwards.
In Caracas, Tscherrig announced that the sides had agreed to launch formal talks on October 30 on the Venezuelan Caribbean island of Margarita.
That appeared to be the most significant gesture of appeasement by both sides since the opposition took control of the legislature in January following an election victory.
Monday's preliminary meeting "took place in a respectful, cordial atmosphere of political will," Tscherrig told a news conference.
The talks will seek "to improve the economic, social, political and institutional circumstances that are fundamental for democratic harmony."
In a private audience with Maduro, the pope urged the parties "to show courage in pursuing the path of sincere and constructive dialogue, to alleviate the suffering of the people, particularly of the poor, and to promote renewed social cohesion," a Vatican statement said.
Tscherrig's announcement came as a surprise after a weekend of rising tension.
The opposition had earlier vowed to fight what it called Maduro's "dictatorship" as it embarked on a new strategy to oust him.
It threatened to put him on trial and stage massive nationwide protests from Wednesday.
Maduro's opponents were furious over a decision by electoral authorities last Thursday to block a referendum on cutting short the presidency of the man they accuse of driving Venezuela, once a booming oil giant, to the brink of collapse.
"Only dictatorships strip their citizens of their rights," opposition spokesman Jesus Torrealba said Monday.
Holding a recall referendum -- a right guaranteed under Venezuela's constitution -- was the opposition's main strategy to get rid of Maduro.
But the National Electoral Council (CNE) last week indefinitely suspended the process, after criminal courts in five states ruled the opposition had committed fraud in an initial petition drive.
On Sunday, the opposition majority in the National Assembly passed a resolution declaring "the breakdown of constitutional order" and "a coup d'etat."
But the assembly has struggled to impose its will over the past months of political conflict. The high court, which Maduro's opponents say he controls, has repeatedly overruled the legislature.
Hit by the fall of global oil prices, Venezuela's economy has crashed, sparking shortages of food, medicine and basic goods.
Maduro derides his opponents as elitists and calls the economic crisis a capitalist conspiracy.
In recession since the beginning of 2014, Venezuela's economy is facing a contraction of 10 percent this year and inflation of 475 percent, rising to 1,660 percent next year, the IMF forecasts.
Before his Vatican visit, Maduro had spent the past few days touring Middle Eastern countries to push his plan for major oil producers to raise prices by cutting output.
His public support has crumbled, with a recent poll finding more than 75 percent of Venezuelans disapprove of him.
Argentina President Mauricio Macri said on Monday that Venezuela should not be a member of the key regional trade bloc Mercosur "because human rights are not being respected there."