Spanish ambassador to India Gustavo de Aristegui has resigned in the wake of charges about getting commissions for obtaining contracts for Spanish companies in Algeria.

He said a "campaign of destruction" had been launched against him and he was resigning to "do no harm either the government or its president during the election campaign", EFE, the Spanish news agency, reported.

In his letter addressed to Foreign Minister Jose Manuel Garcia-Margallo, Arístegui regretted the "repulsive attacks" on his honour and professionalism and justified his resignation after a "dirty campaigning" over the commission charges which were reported in the leading El Mundo newspaper on its front pages last week.

The resignation of the ambassador, a high-profile envoy in diplomatic circles in New Delhi and a former ruling party MP considered close to the establishment, came a week before the elections and on the eve of a face-off on television between ruling People's Party leader and Prime Minister Mariano Rajoy and Spanish Socialist Workers' Party leader and leader of opposition Pedro Sanchez.