A Swiss adventurer soared above sun-splashed Spanish valleys toward Morocco on Tuesday on the world's first intercontinental flight in a solar-powered plane.

Bertrand Piccard, a 54-year-old psychiatrist and balloonist, took off into the night skies above Madrid in the Solar Impulse plane, a giant as big as an Airbus A340 but as light as an average family car.

After a graceful, nearly silent takeoff at 5:22 am (0322 GMT), he guided the experimental plane southward from Madrid-Barajas airport and within five hours was halfway between the Spanish capital and the southern coast.

An onboard camera relayed pictures of the valleys stretched out below the aircraft, which has 12,000 solar cells in the wings turning four electrical motors.

"For one hour I had the full moon on my right and I had the sunrise on my left and that was absolutely gorgeous. I had all the colours of the rainbow in the sky and also on the ground," Piccard told AFP in an interview from the cockpit shortly after setting out.

"The question is not to use solar power for normal airplanes," he added.

"The question is more to demonstrate that we can achieve incredible goals, almost impossible goals with new technologies, without fuel, just with solar energy, and raise awareness that if we can do it in the air of course everybody can do it on the ground."

Piccard gradually piloted the plane toward 3,600 metres (11,800 feet) as he headed to Seville in southern Spain at about 40 kilometres (25 miles) per hour.

He was then to cross the Strait of Gibraltar at 8,500 metres (28,000 feet), enter Moroccan airspace over Tangiers and land at Rabat-Sale airport sometime after 11:00 pm (2200 GMT).

All that, without using a drop of fuel.

Each of the motors on the carbon-fibre plane charges 400-kilogramme (880-pound) lithium polymer batteries during the day, allowing the aircraft to carry on flying after dark.

"I think the challenge is really the first intercontinental flight on solar power," Piccard said.

"We will leave Europe to enter into Africa crossing the Strait of Gibraltar and also bringing a message of inspiration for the Moroccan Agency for Solar Energy, which is preparing a huge and very ambitious solar energy programme for Morocco."

Organisers say the voyage has been timed to coincide with the launch of construction on the largest-ever solar thermal plant in Morocco's southern Ouarzazate region.

Piccard, who made the world's first non-stop round-the-world balloon flight in 1999 together with Briton Brian Jones, took over the plane's controls from project co-founder Andre Borschberg, a 59-year-old Swiss executive and pilot who flew a first leg from Payerne in Switzerland, landing in Madrid on May 25.

The voyage, 2,500 kilometres (1,550 miles) overall, is also intended as a rehearsal for Solar Impulse's round-the-world flight planned for 2014.

The aircraft made history in July 2010 as the first manned plane to fly around the clock on the sun's energy.

It holds the record for the longest flight by a manned solar-powered aeroplane after staying aloft for 26 hours, 10 minutes and 19 seconds above Switzerland, also setting a record for altitude by flying at 9,235 metres (30,298 feet).