A Peruvian indigenous group has freed a group of tourists held for over a day in a protest over what the community alleged to be government inaction over toxic oil spills, one of the released tourists and local officials have said.

The Cuninico indigenous group, from the Urarinas district in Loreto province in Peru's Amazon rainforest, had held an estimated 150 tourists - which included some US and European nationals - to raise awareness about the oil spillage in a local river, according to local media.

"We were just all freed, we have boarded a boat and are on our way to (the city of) Iquitos," one of the freed tourists, Peruvian Angela Ramirez, told Reuters.

Peru's independent public defender agency said on Twitter that "after dialogue with the (head) of the Cuninico communities, our request to release people was accepted."

"The right and respect for life must prevail," the chief of the indigenous group, Watson Trujillo, told local media outlet RPP.

RPP added that none of the tourists were physically harmed.

Tourists rest on the boat where they are being held

Among those taken while traveling river boats were individuals with disabilities, a pregnant women and a 1-month-old child, Ms Ramirez said.

Media reports cited the number of people being held as ranging from 70 to as many as 300, including between 17 and 23 foreign nationals.

The UK's foreign ministry said in a statement that it was in contact with local authorities regarding a "very small number of British nationals involved in an incident in Peru."