But he urged people to find other ways to express their fervency.

City officials have for months discussed removing the locks and protecting the bridge, first built in the early 1800s and reconstructed in the 1980s. Worries about seeming insensitive or oblivious to the popularity of such a lasting declaration of affection were one factor officials considered when they tried to figure out how best to restore the landmark bridge.

Mr. Julliard said the removal of the locks, however unsentimental, was necessary for security and aesthetic reasons.

The city will temporarily replace the bridge’s lock-laden grills this week with panels painted by street artists, and it will later replace those with custom-made plexiglass to protect the historic iron grillwork. The plexiglass will allow pedestrians to once again see the Seine through the grillwork. The locks had obscured the view.

When locks first began to appear more than five years ago, some “could be seen as rather pleasant, but as years passed they took on such proportions that they were no longer acceptable for the cultural heritage” of Paris, Mr. Julliard said.

Most of the locks look rather flimsy, bought for 5 or 10 euros ($5.50 to $11) along the quays on either side of the Seine, but with hundreds of thousands hanging on the bridge, they were too heavy for its elegant ironwork. There was a constant risk that batches of the locks or even a whole panel could have come crashing down on the boats passing beneath. For some time, the city has periodically replaced whole sections of the bridge, only to see them fill again with locks.