The British energy company that has angered British environmentalists by drilling off Greenland is exploring for oil off the sun-drenched beaches of southern Spain.

Cairn Energy, which is run by former Scottish rugby player Sir Bill Gammell, has won the rights to operate oil rigs in 4,000 square kilometres in the Gulf of Valencia.

The Edinburgh-based group confirmed it was in the "very early stages of the exploration process" and having obtained two licences from the government in Madrid. It is evaluating data on the area and did not expect any drilling to start for at least two years. The acreage which takes in water depths of up to 1,000 metres has been handed out as part of a drive by ministers to increase the country's self-sufficiency in energy. Oil and gas rights have also been recently handed out to other companies off the Costa del Sol causing panic in the town hall at Marbella where the local mayor insists it is incompatible with the area's crucial tourism industry.

Angeles Muñoz, the mayor of Marbella, is quoted in local media as saying the oil company activity "puts our coast and eco-system in danger. We cannot tolerate them [central government] playing with the future of the Costa del Sol and our coastline".

Ex-patriate British websites in Spain have been humming with comments. "Given the appalling health and safety in Spain it would be madness to allow an oil/gas rig off the coast. If it had a blow-out, the whole coast could be unusable. Is that really worth the risk?" asked "Fred" on the Olive Branch Newspaper site.

But others disagree. "Ben" said: "These people have allowed the construction of the 'concrete collar' along the coast and resist at every opportunity the construction of proper infrastructure including water treatment works on the grounds of cost, so continue to allow part-treated sewage to be discharged metres from tourist beaches and now they object to the creation of jobs and tax revenues at sites miles out at sea."

Spain has been more in the energy news in recent times for its strong support for setting up solar arrays and wind farms but has always had a very small offshore oil industry. BP owns the Castellon refinery on the Mediterranean coast and keeps the European head office of BP Solar in Madrid. Local oil company, Repsol, has been active off the coast of Tarragona since the 1970s.

The appearance of Cairn could excite investors if not holidaymakers. The company made a name for itself by making major discoveries in Rajasthan in India on acreage that was handed over by Shell after it had failed to find anything.