Media playback is unsupported on your device Media caption Workers erect the concrete balls to deter 'train surfers'

Railway staff in Indonesia have started hanging concrete balls above train tracks to try to prevent commuters from riding on carriage roofs.

The first balls were installed just above carriage-height near a station outside the capital, Jakarta.

More will be put up elsewhere if they are found to keep people off the roofs.

Previous attempts to deter roof riders included spraying roofs with paint, spreading oil on carriages and hiring musicians to perform safety songs.

Correspondents say those initiatives have failed. Officials hope that the latest move will prove to be the ultimate deterrent.

Roof riders also face the possibility of imprisonment.

Electrocuted

The balls - which can deliver a severe blow to the head - will be suspended a few inches above the tops of carriages at points where trains enter or pull out of stations, or where they go through crossings.

Image caption Critics say that 'roof surfing' takes places because there are not enough trains

Officials told the BBC that "roof surfing" can be extremely dangerous. In 2008 at least 53 passengers died in an accident while travelling on a train roof. In 2011, 11 people were killed.

Most victims are electrocuted by overhead power cables, but some fall off train carriages while trains are moving.

The BBC's Dewi Safitri in Jakarta says that passengers on train roofs can be seen every morning and evening. At peak times about 400,000 commuters cram in or onto carriages to travel into and out of the centre of Jakarta.

While tickets are cheap by Western standards, poorer people struggle to pay which is why they go on the roofs, correspondents say.

The main problem, commuters say, is just how crowded the trains are. Reports say some ticket holders also end up on train roofs because there is no room inside.

Officials say they have tried everything to stop the problem - and even put rolls of barbed wire on train roofs - but nothing has worked.

Officials say that if the latest initiative is successful, the project will be expanded.

But the "roof surfers" themselves told the Associated Press news agency that they are determined not to be put off.

"I was really scared when I first heard about these balls,'' said Mulyanto, 27, who rides daily between his hometown of Bogor and Jakarta almost every day for work.

"It sounds like it could be really dangerous. But I don't think it will last long. They have tried everything to keep us from riding... but in the end we always win.''

Indonesian trains run on often poorly maintained tracks left behind by Dutch colonisers 60 years ago.

Critics say that the problem of "roof surfing" will never be completely ironed out until there are fewer delays and enough trains to meet demand.