Venezuelan agents have been sacked after briefly detaining opposition leader and head of Parliament Juan Guaidó, who days ago announced he would assume the presidency.
Mr Guaidó was on his way to a rally when intelligence agents intercepted his car in a road north of the capital, Caracas, opposition members said.
The agents have been sacked over the "irregular" operation, Communications Minister Jorge Rodríguez said.
President Nicolás Maduro was sworn in for a second six-year term on Thursday.
The opposition calls him illegitimate and Mr Guaidó said on Friday he was ready to assume the Venezuelan presidency on an interim basis.
His wife Fabiana Rosales and daughter were travelling with him to a political rally in the northern state of Vargas.
Ms Rosales announced her husband's detention on Twitter and video was posted on social media not long afterwards apparently showing the moment of Mr Guaidó's detention.
Mr Rodríguez said the agents had acted unilaterally as part of a "media show" and that they would go through disciplinary procedures.
Two journalists who were covering the case - Beatriz Adrián, from Colombia's Caracol television, and Osmary Hernández, who works for CNN's Spanish news channel - were also briefly detained.
Mr Guaidó is the speaker of the National Assembly, which has been stripped of its powers since Mr Maduro's ruling Socialist Party lost control of it in 2016.
Mr Maduro dismissed his comments as a "show". His re-election in May last year was marred by an opposition boycott and allegations of vote-rigging.
Since taking office Mr Maduro has been condemned at home and abroad for alleged human rights abuses and for his handling of the economy, which is in a state of near-collapse.
Venezuela is one of the world's largest oil producers but its overreliance on the product, which accounts for about 95% of its export earnings, left the country vulnerable when prices dropped in 2014.
As a result, the cost of imported goods like food and medicine has risen, and currency inflation has skyrocketed.
The government is also increasingly struggling to get credit after it defaulted on some of its government bonds. In response, the government has printed more money, devaluing the currency further.
Mr Maduro was first elected in 2013, succeeding Hugo Chávez who died of cancer after governing for 14 years.