(CNN) -- The pilgrimage that brings more than 2 million Muslims to Mecca every year tends to make them more religiously observant and also more tolerant, a huge study of Pakistani pilgrims suggests.
Hamoud al-Massri, of Egypt, says that after this year's hajj, he will read more about people of different cultures.
Muslims who undertake the hajj "return with more positive views towards people from other countries," are more likely to say "that people of different religions are equal," and are twice as likely as other religious Muslims to condemn Osama bin Laden, the study found.
"People become more orthodox yet more tolerant," one of the study's authors, Asim Ijaz Khwaja of Harvard University, said of hajjis -- those who make the pilgrimage.
He described the study's findings Monday, as this year's annual pilgrimage reached its climax, the symbolic stoning of the devil on the festival of Eid al-Adha, an Islamic holiday that traditionally marks the end of the hajj.
This year's hajj ends Wednesday. Learn more about the rituals of the hajj »
Habib Allah, a 24-year-old Pakistani who never left his home country before undertaking this year's hajj, echoed sentiments expressed by many people in the study, which surveyed pilgrims from 2006. The Pakistani said he felt like he had seen "the whole world" in Mecca, Saudi Arabia.
"I felt like we are all brothers," he said. "I never thought about this before. The hajj has changed my thoughts about other Muslims from other countries. The hajj has united us as Muslims and as brothers."
And that feeling extended to non-Muslims as well, he said.
"After I performed the hajj, I felt that the world is small and we all sharing one place ... the earth. We should all live in peace with each other, whether with Muslims or non- Muslims," he said
Hamoud al-Massri, a 29-year-old teacher from Cairo, Egypt, expressed similar thoughts about his hajj journey this year. Watch an explanation of the symbolism of the hajj's key rituals »
"The hajj taught me that at the end we are all human beings [who] need each other. From now on I will start reading more about other cultures, and not only Muslim cultures but all others," al-Massri said.
Khwaja and his colleagues were startled by that sentiment.
"What was surprising to us was that the tolerance extended to others -- to non-Muslims as well," he said.
Hajjis are also more likely to back education for girls and work for women, the study found.
Khwaja suspects that is because men and women mix so freely on the hajj, even at prayer -- partly because it is impractical to segregate the sexes when more than 2 million people converge on Saudi Arabia en masse.
"Men and women interact with each other, actually praying side by side," he said.
That can be a new experience for many men from Pakistan, where women sometimes are discouraged from attending mosques.
But some responded positively, the researchers found.
"The fact that men and women can pray together is good," one 45-year-old man told them. "You cannot dislike anything about the Kabaa," the cube-shaped building within Mecca's Great Mosque toward which Muslims worldwide face during daily prayers.
Going on the hajj, which all Muslims must do at least once if they are able, can also embolden women to challenge religious authority when they return home.
"A woman may not be encouraged to go to the mosque or seek education or work in Pakistan -- in fact, she may face resistance in doing so, particularly by local clergy," Khwaja said.
Khwaja said if she has not been on the hajj, "she has no authority for challenging that."
"But on the hajj, she might see a woman who is leading her group, in control of a group, in this most holy of places. If she sees that this is allowed in Mecca and Medina, now she is armed to say to her local cleric, 'I saw this in Mecca, so who are you to tell me it is wrong?' " Khwaja said.
John C. Green, a senior fellow in religion and American politics at the Pew Forum on Religion & Public Life, said he was startled by some of the findings.
Other studies have suggested that deeply religious people tend to be more tolerant than average in some ways, but not in others.
"Higher levels of religious observance tend to make people more tolerant of different religions," Green said. Religious people also tend to be more accepting of other ethnic groups, he said.
But being deeply religious is not commonly associated with women's empowerment, he said, expressing surprise at that aspect of Khwaja's study, which he said he had not read.
"That would be a very powerful finding, and it would suggest that there is something unique going on with the hajj," Green said.
Khwaja chuckled at the Mark Twain quote: "Travel is fatal to prejudice, bigotry, and narrow-mindedness." But Khwaja said it was not simply travel that changed pilgrims -- it was seeing unfamiliar practices in the holiest of settings.
"That this is happening in a highly religious context may give them the ability to accept diversity. If you see people praying differently, you will say that [a given local practice] can't really be the only acceptable way to pray -- wearing a hat, or keeping your pants above your ankles," he said, citing two common Pakistani customs.
And indeed, Khwaja said, going on the hajj makes pilgrims less likely to observe strictly local customs, such as the use of amulets.
The study could have major policy implications for those fighting extremism, he said.
Encouraging the hajj might increase the pool of Muslims whose tolerant attitudes would inspire them to moderate those with more extreme views in their midst, he suggested.
"In Pakistan, that is not happening much. People are often passive and say, 'That is not my business.' But as tolerance builds up, ultimately there is a greater chance that it will become more active," Khwaja said.
He admitted that the study might have found different results in another country. Pakistanis, whom he called more liberal than Saudis but more conservative than Indonesians or Malaysians, may have been influenced by the large, relatively liberal southeast Asian population in Mecca.
"It would be interesting to see what the effects are on Indonesians or Americans -- to see if they become more conservative," he said.
For the study, three economists interviewed 1,600 Pakistanis, half of whom had been on the hajj in 2006 and half of whom had applied for visas to go but were rejected. Respondents answered 200 questions in face-to-face interviews that lasted hours. The interviews took place five to eight months after the pilgrims came home.
Khwaja said he was not aware of any earlier large empirical study of hajjis. "Most of the literature of the hajj consists of personal narratives. Most of the 'evidence,' therefore, is anecdotes."
The study is "Analyzing the Impacts of the Hajj Pilgrimage to Mecca," by David Clingingsmith, Asim Ijaz Khwaja and Michael Kremer, published April 23, 2008.
CNN's Mohammed Tawfeeq in Mecca, Saudi Arabia, contributed to this report.