Polish authorities have blocked off a wooded area near a railway track after scores of treasure hunters swarmed south-west Poland looking for an alleged Nazi gold train.

The city of Walbrzych and its surrounding wooded hills are experiencing a gold rush after two men, a Pole and a German, informed the authorities through their lawyers that they have found a Nazi train with armaments and valuables that reportedly went missing in the spring of 1945.

Inspired by a local legend since the Second World War, people with metal detectors are combing the area and its still-used railway tracks.

The alleged site is somewhere between the 61th and the 65th kilometres of the tracks that wind their way from Walbrzych to Wroclaw.

Provincial governor Tomasz Smolarz said on Monday that police, city and railway guards are now patrolling the area and blocking treasure hunters to prevent any accidents with trains running on the tracks.

"A few hectares (acres) of land are now being secured. People have been barred from the woods" surrounding the site, he said.

"Half of Walbrzych's residents and other people are going treasure hunting or just for walks to see the site. We are worried for their security," police spokeswoman Magdalena Koroscik said.

People walking down the tracks cannot escape "a train that emerges from behind the rocks at 70 kph (43 mph)".

A man taking a selfie on the tracks reportedly narrowly missed being hit, she said.

Mr Smolarz is also asking the military to examine the site with earth-penetrating equipment to look for any hidden train.

Authorities said numerous previous reports of a find have only yielded rusty pieces of metal.