A train driver has died and at least 40 people have been injured in a head-on rail collision near Peru's most popular tourist attraction, Machu Picchu.

Two trains collided on the single track leading to the ancient Inca town on Tuesday, according to a statement from the local government.

It said that 20 ambulances had attended the scene and that injured people had been transferred to medical facilities in the nearby city of Cusco.

The US embassy in Peru confirmed that US citizens were among those injured in the crash, although the police have yet to confirm the identities of the involved individuals.

Local media outlet Peru21 reports that hundreds of tourists remain at the scene awaiting evacuation, which has been hampered by difficult terrain around the crash site.

At least 20 of the injured are in a serious condition, a health official told the Reuters news agency.

The collision occurred on the track linking Ollantaytambo Station and Aguas Calientes, the town closest to Machu Picchu. The journey between the two stations usually takes around 90 minutes.

The two trains involved in the accident were operated by PeruRail and Inca Rail respectively.

PeruRail issued a statement expressing deep regret over the incident and said its staff had immediately provided first aid to the train driver, the conductor, and the passengers involved.

The cause of the accident has not yet been made clear.

This crash occurs amid ongoing disputes between transport providers to the UNESCO World Heritage site, with local communities expressing dissatisfaction over what they claim is an insufficiently open bidding process for transportation services.

The trains and buses that take tourists to the ancient town come at steep prices and can be highly lucrative due to the site's limited accessibility.

Built in the Peruvian Andes in the 15th Century, the Incan city of Machu Picchu is one of the Seven Modern Wonders of the World. Visitors can take a variety of trains and buses to reach the site or hike along the Inca trail with a registered tour operator.

In 2011, officials implemented a daily cap on visitors to protect and preserve the site, but concerns about overtourism persist.