Image copyright IG St Pauli Image caption The paint first received attention after being used by a community group in Germany

Be warned: If you pee on a wall in San Francisco it may come straight back.

The city's public works agency says it is testing a new urine-repellent paint in areas popular with people looking to relieve themselves.

Anyone choosing to use the treated walls as a toilet will see their urine "bounce back", according to a spokeswoman for the agency.

The agency's director got the idea after reading about the paint's use in a nightclub district in Germany.

Hamburg's IG St Pauli community group turned to the paint to cope with a problem brought by the 20 million tourists that visit the district every year.

In March, they told BBC Newsbeat that the paint seemed to be working and the problem was finally getting "the attention it deserves".

The paint, called Ultra-Ever Dry, creates a barrier of air in front of the surface that will "completely repel almost any liquid," according to its makers.

'Hold it!'

In a trial project, San Francisco authorities have painted nine walls in areas close to bars and in neighbourhoods with large homeless populations.

Signs posted on the walls, written in English, Chinese and Spanish, say: "Hold it! ... seek relief in an appropriate place".

"The idea is they will think twice next time about urinating in public," said Rachel Gordon, a spokeswoman for the city's Public Works Department.

"We've gotten many, many calls from people who wanted it done in their alley or on their buildings," Gordon said.

She said the cost of painting the walls is much lower than sending out workers to clean areas saturated with urine.

More public toilets were also planned across the city, she added.