In Pécs, both young students of the local university and lovers began to clamp padlocks to a wrought-iron fence in a narrow street linking the mosque in the city's main square and the magnificent medieval cathedral, either as a symbol of the struggle to complete the study program (Pécs' university is known for being especially hard) or a symbol of their commitment to one another. However, after the fence was completely covered and no more padlocks could be added, couples, both locals and tourists, began attaching them to fences and statues throughout the town center.
Local authorities organized several attempts to discourage people from attaching the padlocks, by putting notices discouraging the activity throughout the town and removing the padlocks as vandalism. More recently, a new iron fence was added near the original one to provide a legal site for couples to attach love padlocks, similar to walls set aside by authorities in some cities for use by graffiti artists. (from Wikipedia)