By Philip Pullella

VATICAN CITY (Reuters) - Italian fashion firm Benetton has agreed to make a donation to a Catholic charity to end a legal dispute with the Vatican over an advertisement that showed Pope Benedict kissing an imam on the lips, the Vatican said on Tuesday.

Spokesman Father Federico Lombardi said the Vatican had won a moral victory, achieving its aim of defending the pope's image through legal means.

The company had promised not to circulate any of the photo-montages and to try to stop use of the image by third parties, Lombardi said. The picture was still widely available on the Internet on Tuesday, however.

The picture of the pope was part of the clothing company's shock advertising campaign called UNHATE, in which a number of world leaders featured. U.S. President Barack Obama was shown kissing Venezuelan President Hugo Chavez.

The size of the company's donation was unspecified. The Vatican said Benetton had also pledged not to use the pope's picture in future without permission.

The company was not immediately able to comment on Tuesday.

A banner with the image of the pope was hung from a bridge near the Vatican when the advertising campaign started in November and posters were put up in Benetton's stores in Italy.

Benetton quickly withdrew the advertisement after a protest from the Vatican, which announced legal action.

At the time, the Vatican said the advert was "damaging not only to the dignity of the pope and the Catholic Church but also to the feelings of believers".

The clothing company has run controversial advertising campaigns in the past, including on the themes of AIDS and race relations.

(Editing by Janet Lawrence)