CAIRN Energy has called time early on its controversial hunt for oil and gas off the Spanish resort island of Ibiza as the company focuses its resources on Senegal.

The Edinburgh based firm said it wants to return its licence to explore beneath the waters off Ibiza, where it hoped to make big finds but ran into a storm of opposition from locals.

A campaign launched to stop exploration off Ibiza won backing from celebrities. Model Kate Moss and DJ Fatboy Slim posted selfies online with signs saying "Ibiza Says No".

The prospect of drilling in a beautiful area rich in wildlife alarmed environmentalists.

Cairn has insisted it takes its social and environmental responsibilities seriously and noted that hundreds of wells have been drilled off Spain, which relies on imports for nearly all the oil and gas it consumes.

The company has stopped work off Ibiza and other areas of the Gulf of Valencia covered by its licences without getting close to drilling any wells.

Cairn had been planning to gather seismic survey data in an area extending to around 30 miles from Ibiza and from Valencia on the mainland.

However, the company said yesterday: "Cairn has informed the Spanish Ministry of Industry, Tourism and Commerce that it intends to withdraw from four exploration permits in the Gulf of Valencia."

Cairn's Spanish portfolio consists of the four licences in the Gulf of Valencia, which it was awarded in 2011.

The company has closed its office in Madrid where around five people were employed.

The announcement came months after Spain's environment ministry published a report that found seismic surveying work could harm sea life such as whales.

Cairn's decision was welcomed as a victory by opponents of drilling in the area.

But Cairn said it remains interested in Spain and has applied for licences covering an area north of the Gulf of Valencia and one in the Bay of Biscay, off the northern coast of Spain.

"The Company has an ongoing commitment to develop the hydrocarbon industry offshore Spain and wishes to continue to work with the Ministry to this effect," said Cairn.

In recent months Cairn's chief executive Simon Thomson has made clear the company's priority on the exploration front is Senegal, where it made two big finds last year.

Noting estimates the two finds contain a billion barrels oil, Mr Thomson said recently the discoveries could pave the way for the company to develop a major new producing area.

Cairn plans to start appraisal drilling off Senegal this year and further exploration is in prospect.

Mr Thomson reckons Senegal could be another company maker for Cairn, which shot to prominence after making bumper finds in India.

Cairn has been prevented from selling the remaining $700m (£430m) stake in its former subsidiary in India amid a tax dispute in the country, depriving the firm of one way of raising funds that could be put to work elsewhere.

Mr Thomson has made clear that some areas have fallen down the priority list at the company.

After spending $1bn drilling off Greenland without making a commercial find the company will not drill any more wells in the area unless a new partner helps to cover the costs.

Cairn axed the jobs of around 90 employees and contractors last year under a reorganisation programme.

Shares in Cairn Energy closed up 1.2p at 183.2p.