Madrid: A helicopter loaded with hashish crashed in southern Spain after hitting an electricity pylon, killing its two pilots, police said Wednesday.

The helicopter crashed in the early hours of Tuesday near the mountain town of Cortes de la Frontera in Malaga province. The bodies of its pilot and co-pilot have been recovered, a local police spokesman said.

"We are working to determine how much hashish was on board," he added.

Regional daily newspaper Malaga Hoy said the helicopter was carrying between 800 and 900 kilos (1,700-1,900 pounds) of hashish and was painted in black to avoid being detected at night.

Police are investigating where the hashish came from. In recent years they have broken up several rings that used helicopters to smuggle hashish from Morocco into southern Spain.

Spain's proximity to North Africa, a major source of hashish, and its close ties with its former colonies in Latin America, a key cocaine-producing region, have made it the main gateway into Europe for narcotics.

Since June 2013, Spanish authorities have seized more than 100 tonnes of hashish in various operations.