Hundreds of foreign tourists are stuck at the world-famous Inca site Machu Picchu because of the unrest in Peru.

Around 800 tourists were affected, the authorities said on Wednesday (local time).

Because of the violent protests against the dismissal and arrest of the left-wing President Pedro Castillo, the railway line between the World Heritage Site and the city of Cusco had previously been closed.

The railway line, which is a hundred kilometers long, is the easiest and most frequently used route to get to or from Machu Picchu.

The reason for the blocking was given by the Peruvian state railway "PeruRail" on Tuesday for security concerns and referred to calls for demonstrations by various organizations in Cusco.

Hundreds of tourists were stuck in the small town of Aguas Calientes at the foot of Machu Picchu.

"We can't get away from here," Israeli Gale Dut told an AFP journalist.

"I'm traveling with my children, it's really a problem." She just wanted to leave Peru "in complete safety", but that's not possible at the moment.

In Peru there have been protests for days against the dismissal and arrest of Castillo and the assumption of office by the new President Dina Boluarte.

In response to the violence, the government declared a nationwide state of emergency on Wednesday.