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 stated that US citizens were among those injured, but police have yet to confirm the identities of anyone involved in the incident.

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 Reuters.

The collision occurred on the track linking Ollantaytambo Station and Aguas Calientes, the closest town 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.

We deeply regret what has happened, PeruRail said in a statement, adding that its staff had immediately provided first aid to the train driver, the train conductor, and the passengers involved in the incident.

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

The crash comes amid an ongoing dispute between providers of transport to the UNESCO world heritage site, with local communities unhappy with what they say is an insufficiently open bidding process.

The trains and buses that take tourists to the ancient town have steep ticket prices and can be highly lucrative due to its 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 series 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 remain about overtourism.