QUITO, June 5 (Reuters) - Ecuadorean Indigenous organizations and environmental advocacy groups on Wednesday protested state-run oil company Petroecuador, saying it is failing to comply with a court order to shut gas flares in the Amazon, though the government said it was closing them.

In 2021, a provincial tribunal in Sucumbios province ordered Petroecuador and a handful of private operators to stop at least 486 flares in inhabited areas by March 2023 and rural places by 2030. Flares burn off natural gas emitted during oil production when there is no infrastructure to capture it.

Residents of the area, who have long alleged slow progress on the shut down, said Petroecuador is merely turning off the flares and sending the gas to larger flaring operations in the Amazon.

"They are turning off the flares and that is not the objective. The objective is their total elimination," said Jairo Salazar, a lawyer for affected residents, as he attended the protest outside the constitutional court. "It's a mockery of the Ecuadorean Amazon."

A group of residents from the Amazon have been holding a hunger strike at a church in Quito for about 10 days to pressure the government.

Salazar said just 63 flares have been shut down in the provinces of Orellana and Sucumbios, but Energy Minister Roberto Luque told a congressional commission on Wednesday 145 Petroecuador flares have been eliminated and there is a plan to shut 341 more by 2030, including those run by private companies.

Petroecuador has said that shutting and taking down each flare takes between 12 and 36 months depending on location and other factors. (Reporting by Tito Correa and Alexandra Valencia Writing by Julia Symmes Cobb; Editing by David Gregorio)