By Myra MacDonald

LONDON (Reuters) - Al Qaeda leader Ayman al-Zawahri has issued his first specific guidelines for jihad, urging restraint in attacking other Muslim sects and non-Muslims and in starting conflicts in countries where jihadis might find a safe base to promote their ideas.

The document, published by the SITE monitoring service, provides a rare look at al Qaeda's strategy 12 years after the September 11 attacks on the United States and the nature of its global ambitions from North Africa to the Caucasus to Kashmir.

While al Qaeda's military aim remained to weaken the United States and Israel, Zawahri stressed the importance of "dawa", or missionary work, to spread its ideas.

"As far as targeting the proxies of America is concerned, it differs from place to place. The basic principle is to avoid entering into any conflict with them, except in the countries where confronting them becomes inevitable," he said.

Those comments are particularly relevant for North Africa, where many analysts believe al Qaeda is using the less restrictive environment which followed the 2011 Arab uprisings to seek new followers, often through local alliances, while avoiding drawing attention to itself by eschewing attacks.

"...our struggle is a long one, and jihad is in need of safe bases," Zawahri said in his "general guidelines for jihad" posted on jihadi forums.

Zawahri spelled out where conflict was inevitable, including Afghanistan, Iraq, Syria, Yemen and Somalia.

In Pakistan, where intelligence sources believe Zawahri is hiding, he said fighting "aims at creating a safe haven for the mujahideen in Pakistan, which can then be used as a launching pad for the struggle of establishing an Islamic system..."

Al Qaeda has a strong support network inside Pakistan - its founder Osama bin Laden lived there until his death in May 2011. It also has close ties to the Tehrik-e-Taliban Pakistan, with which the Pakistan government has said it will hold peace talks.

Story continues

Zawahri cited the need to weaken Algeria - which crushed Islamist militants in a civil war in the 1990s - and spread jihadi influence throughout the Maghreb and West Africa.

And in an apparent nod to those who say al Qaeda's focus on the United States weakens their battle against governments at home, he endorsed the right of militants to fight Russians in the Caucasus, Indians in Kashmir and Chinese in Xinjiang.

AVOID ATTACKING OTHER SECTS

Founded in 1988 during the Soviet occupation of Afghanistan, al Qaeda has adapted to the Western onslaught against it which followed the September 11 attacks by building a network of alliances and affiliates in Muslim countries around the world.

Adept at exploiting conflicts like Afghanistan and Iraq, the Arab uprisings have given al Qaeda a new lease of life - in Syria, for example, fighters loyal to al Qaeda play a powerful role in the opposition to President Bashar al-Assad.

But its indiscriminate violence, including suicide bombings and targeting of Shi'ite Muslims, has made it unpopular among many Muslims.

Zawahri called on his mainly Salafist followers to avoid attacking other Muslim sects, and said if they were attacked, they should limit their response to those involved in fighting.

They should also leave alone Christians, Hindus and Sikhs living in Muslim lands, respect the lives of women and children and refrain from targeting enemies in mosques, markets and gatherings where they mix with Muslims they were not fighting.

But while affiliates subscribe to al Qaeda's ideology, they are largely autonomous in day-to-day operations, making it hard for Zawahri to control the behavior of their fighters.

"The biggest theme in Zawahri's document is restraint," Daveed Gartenstein-Ross, a expert at the Foundation for Defense of Democracies, said on Twitter. "This seems to acknowledge the excesses that have tarnished AQ's brand."

The document was posted on Sept 13, according to SITE, although it was unclear when the guidelines were written by Zawahri, whose messages - based on their content - appear to take weeks to be smuggled out from where he is in hiding.

(Editing by Mike Collett-White)