By Rania El Gamal

SANAA (Reuters) - Dozens of Saudi Islamist militants have left the battlefields of Syria and Iraq for Yemen, where their experience appears to have contributed to a spate of lethal al Qaeda attacks, a senior Yemeni security official said.

The influx detected in the last few months is worrying for Yemen, a turbulent country where several hundred Saudi militants are already thought to be fighting alongside their Yemeni counterparts in al Qaeda in the Arabian Peninsula (AQAP).

The initial core of Saudis fled to Yemen after the kingdom defeated a violent al Qaeda campaign between 2003 and 2006, helping to create AQAP with their Yemeni comrades in 2009.

"Now the Saudi who comes here is an experienced fighter from the war in Iraq or Syria and is ready to be 'martyred'," said the Yemeni security official, who asked not to be named.

"They know how to build weapons and bombs, and they are teaching others."

Foreign militants have flocked to Syria to join Islamist rebels battling President Bashar al-Assad in the last two years. Iraq had previously served as a magnet for global jihadis eager to fight U.S. forces and the Shi'ite-led authorities which came to power after the 2003 invasion that toppled Saddam Hussein.

Yemen is also a jihadi battleground where U.S. drone strikes have targeted al Qaeda leaders for more than a decade.

AQAP is not short of bomb-making expertise itself, as it has shown in bomb plots against Saudi and Western targets.

These include an attempt by a Nigerian to blow up a Detroit-bound airliner in 2009 with a bomb concealed in his underwear and a foiled plot to send two air freight packages containing bombs to the United States in 2010.

Al Qaeda militants exploited political chaos in Yemen after the 2011 uprising that eventually unseated veteran President Ali Abdullah Saleh to seize control of several southern towns.

Despite losing that territorial base after a military offensive backed by U.S. drones in 2012, they have regrouped, staging a series of attacks across Yemen in the past few months, some of which are thought to be the work of Saudis.

Story continues

A Yemeni government inquiry said most of the perpetrators of a December 5 raid on a Defence Ministry hospital in Sanaa, in which at least 52 people were killed, were Saudi citizens.

AL QAEDA APOLOGY

It was the single bloodiest incident in Yemen in 18 months and even AQAP appeared embarrassed, blaming a renegade fighter for slaughtering unarmed medics and patients at the hospital.

The killings, captured on closed-circuit television and broadcast by state media, caused outrage in Yemen, where U.S. drone strikes had previously gained some sympathy for AQAP.

The security official said some Saudi militants who had come to Yemen from Syria were on trial after being captured and that some Saudis involved in the hospital assault had fought in Iraq.

Abdulrazzaq al-Jamal, a Yemeni journalist who has interviewed AQAP members, said the group was imitating the Islamic State in Iraq and the Levant (ISIL), which operates in Iraq and Syria, in how it selects its targets and tactics.

"AQAP used to execute its operations using roadside bombs. Now it has started ... storming into facilities," he said.

On February 13, seven people were killed in a bomb, grenade and gun assault on the main prison in Sanaa and 19 people jailed for terrorism-related crimes escaped in the chaos.

Black-clad militants appeared in an AQAP video posted online last month that documented four attacks, including the one on the Defence Ministry hospital. They were seen training in the desert, preparing for action and making speeches beforehand.

Nine of the 14 men shown had Saudi accents or names such as Abu Khaled al-Makki and Abu Naser al-Najdi, suggesting they hail from the Saudi city of Mecca or the kingdom's Najd region.

INFIGHTING IN SYRIA

While the security official said dozens of Saudis had come to Yemen from Syria and Iraq, as the impact of those conflicts ripples across the Middle East, gauging their numbers is hard, partly because of the existing Saudi presence in AQAP.

On February 11, Yemen said it had handed Saudi Arabia 29 of its nationals wanted as al Qaeda militants. There was no information about when the Saudis had arrived in Yemen.

A Gulf diplomatic source said more than 10 "influential" Saudis had joined AQAP in Yemen after fighting in Syria.

However, a Saudi Interior Ministry spokesman, Major General Mansour Turki, said he thought it unlikely that many Saudi militants would be heading to Yemen from Syria or Iraq because for now those countries remained the main theatres for jihad.

He said "a few hundred" Saudi militants had previously moved to Yemen and that the ministry had no information about any who may have traveled there from Syria recently without transiting the kingdom. "We would need to look closely into it," he said.

In Syria, a commander with the Western-backed Free Syrian Army, who declined to be identified, said he had heard of an outflow of Saudi militants to Yemen, but had no details.

It was not immediately clear whether their departure was part of a new strategy to step up AQAP's struggle in Yemen, or was due to disillusion caused by months of bloody infighting in Syria between ISIL and the Nusra Front, its al Qaeda rival.

Al Qaeda's leader Ayman al-Zawahri has disavowed ISIL, whose earlier ultra-hardline incarnation in Iraq caused a Sunni Muslim backlash in the mid-2000s, prompting armed tribesmen to switch sides and help U.S. forces roll back the militants in Anbar province - ground they have since regained.

Charles Lister, a visiting fellow at the Brookings Doha Center, said it was likely that at least some Saudis had moved from Syria to Yemen, where those with sustained battle experience would prove a valuable resource for AQAP.

AQAP and its Ansar al-Sharia affiliate have been recovering from previous setbacks and are now reasserting themselves territorially, reacquiring sources of finance, and generally preparing for a new campaign of violence, Lister said.

"Recent attacks, particularly those in Sanaa, would suggest this second offensive phase has already begun."

(Additional reporting by Mohammed Ghobari in Sanaa, Mariam Karouny in Beirut and Angus McDowall in Riyadh,; Writing by Rania El Gamal, Editing by William Maclean and Alistair Lyon)