(Adds comments from experts)
* Strong support for sharia courts to regulate family issues
* More limited backing for harsh punishments, death edicts
* Varied views on democracy, suicide bombing and headscarves
By Religion Editor Tom Heneghan
April 30 (Reuters) - Large majorities in the Muslim world want the Islamic legal and moral code of sharia as the official law in their countries, but they disagree on what it includes and who should be subject to it, an extensive new survey says.
Suicide bombing was mostly rejected In the study by the Washington-based Pew Forum, but it won 40 percent support in the Palestinian territories, 39 percent in Afghanistan, 29 percent in Eygpt and 26 percent in Bangladesh.
Three-quarters of respondents said abortion is morally wrong and 80 percent or more rejected homosexuality and sex outside of marriage.
Over three-quarters of Muslims in the Middle East and North Africa, South Asia and Southeast Asia want sharia courts to decide family law issues such as divorce and property disputes, the Pew Forum on Religion and Public Life said on Tuesday.
Views on punishments such as chopping off thieves' hands or decreeing death for apostates is more evenly divided in much of the Islamic world, although more than three-quarters of Muslims in South Asia say they are justified.
Those punishments have helped make sharia controversial in some non-Islamic countries, where some critics say radical Muslims want to impose it on Western societies, but the survey shows views in Muslim countries are far from monolithic.
"Muslims are not equally comfortable with all aspects of sharia," the study said. "Most do not believe it should be applied to non-Muslims."
Unlike codified Western law, sharia is a loosely defined set of moral and legal guidelines based on the Koran, the sayings of Prophet Mohammad (hadith) and Muslim traditions. Its rules and advice cover everything from prayers to personal hygiene.
Amaney Jamal, a Princeton University political scientist who was special adviser for the project, said Muslims in poor and repressive societies tended to identify sharia with basic Islamic values such as equality and social justice.
"In those societies, you tend to see significant support for sharia," she told journalists on a conference call. By contrast, Muslims who have lived under "narrow if not rigid" Islamic systems were less supportive of sharia as the official law.
POLITICS AND VIOLENCE
More than four-fifths of the 38,000 Muslims interviewed in 39 countries said non-Muslims in their countries could practice their faith freely and that this was good.
This view was strongest in South Asia, where 97 percent of Bangladeshis and 96 percent of Pakistanis agreed, while the lowest Middle Eastern result was 77 percent in Egypt.
The survey polled only Muslims and not minorities. In several Muslim countries, embattled Christian minorities say they cannot practise their faith freely and are subject to discrimination and physical attacks.
The survey produced mixed results on questions relating to the relationship between politics and Islam.
Democracy wins slight majorities in key Middle Eastern states - 54 percent in Iraq, 55 percent in Egypt - and falls to 29 percent in Pakistan. By contrast, it stands at 81 percent in Lebanon, 75 percent in Tunisia and 70 percent in Bangladesh.
In most countries surveyed, Muslims were more worried about Islamist militancy than any other form of religious violence.
SEX AND VEILS
Views on whether women should decide themselves if they should wear a headscarf vary greatly, from 89 percent in Tunisia and 79 percent in Indonesia saying yes and 45 percent in Iraq and 30 percent in Afghanistan saying no.
Majorities from 74 percent in Lebanon to 96 percent in Malaysia said wives should always obey their husbands.
Only a minority saw Sunni-Shi'ite tensions as a very big problem, ranging from 38 percent in Lebanon and 34 percent in Pakistan to 23 percent in Iraq and 14 percent in Turkey.
Conflict with other religions loomed larger, with 68 percent in Lebanon saying it was a big problem, 65 percent in Tunisia, 60 percent in Nigeria and 57 percent in Pakistan.
A section of the survey on U.S. Muslims noted they "sometimes more closely resemble other Americans than they do Muslims around the world". Only about half say their closest friends are Muslim, compared to 95 percent of Muslims globally. (Reporting By Tom Heneghan; Editing by Mike Collett-White and Michael Roddy)