Some of the officers were later forced to carry a coffin of an indigenous activist said to have been killed during the protests.
The brazen acts occurred in the capital of Quito at a cultural center where indigenous protesters set up a base.
Big jumps in fuel prices after the government ended subsidies last week plunged Ecuador into upheaval, triggering protests, looting, vandalism, clashes with security forces, the blocking of highways and the suspension of parts of its vital oil industry.
Ecuador's cuts in fuel subsidies were among measures announced as part of a $4.2 billion funding plan with the International Monetary Fund, which says the funds will strengthen the economy and generate jobs. Indigenous groups condemn the deal with the IMF, saying austerity measures will deepen economic inequality.
An indigenous leader and four other people have died in the violence, according to the public defender's office. The president's office said two people died.
At the cultural center, one captive officer was forced to drape a national flag around his shoulders and don a hat of a style worn by some indigenous people. The lone female officer in the group was seen wiping away tears.
All were forced to remove their boots in front of hundreds of demonstrators, some holding white roses in tribute to people who have been killed in the unrest. The police officers, who appeared to be unharmed and were checked by medics, were let go late Thursday.
More than 20 journalists inside the cultural center were barred for a while from leaving by protesters.
"With the blood of our brothers, we won't negotiate," indigenous leader Jaime Vargas declared in a speech to the crowd. He accused the government, which has floated agricultural aid and other incentives for indigenous groups as a way to resolve the crisis, of deceiving and neglecting Ecuador's poor.
José Briones, secretary general of the president's office, said protesters must release all people they "kidnapped" before any dialogue with the government can proceed. He also said that order was being restored nationwide and that more than 70% of Ecuador's cities were peaceful.
"There's a lot of uncertainty about what might happen" in Ecuador, said Michael Shifter, president of the Inter-American Dialogue, a U.S.-based research group. He compared the tenure of President Lenín Moreno, who is cutting subsidies in an attempt to reduce Ecuador's big debt, to the policies of his leftist predecessor and former ally, Rafael Correa.
"The big lesson is that it's very difficult to go from populism to a more orthodox economic policy," Shifter said. He speculated that Moreno was not fully prepared for the ferocity of the reaction to the fuel price increases.
Indigenous protesters are playing a key role in the opposition to the government, as they have done in the past due to their traditional grievances as a minority.
The announcement by the public defender's office that one of those killed was an indigenous leader seemed certain to inflame tensions. The leader was identified by the office, which monitors human rights, as Inocencio Tucumbi of Ecuador's Cotopaxi region.
Some 266 people have been injured and 864 were detained, though 80 percent of detainees have been released for lack of evidence, the public defender's office said.
Moreno's office said the number of deaths was lower. It said two people had died in accidents linked to the violence across the country.
One person was hit and killed by a car, and another person suffered fatal injuries after a fall during protests in Quito, according to Briones.
There was no immediate explanation for the discrepancy in the reports on the death toll.
Protesters temporarily blocked roads in several parts of Quito on Thursday, but traffic was flowing in many areas following a day of clashes around the capital's historical center.
The government headquarters is in the old area, but Moreno moved its operations to the port city of Guayaquil because of security concerns.
Associated Press writers Christopher Torchia in Rio de Janeiro and Luis Alonso in Washington contributed to this report.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.