Even for someone indifferent or downright hostile to religion, Friday prayers at a mosque have a haunting sound and beauty, a compelling quality of devoutness and spirituality rare in any other faith and hard not to find deeply affecting. At Masjid-e-Tawheed, the mosque I am visiting on a crisp winter's morning, there is good reason, perhaps, for the congregation of more than 200 to feel an extra surge of passion for their faith, of feeling that theirs is the right belief system for this flawed world.

For while in one direction from the mosque, the view of barren, rocky mountains shimmering in the desert sunlight could place Masjid-e-Tawheed in any number of locations in the Islamic world, a couple of miles in the opposite direction lies what one would imagine to be the worst place in the world for an even halfway-strict Muslim – something, indeed, not unlike hell.

Masjid-e-Tawheed is a 10-minute drive from Las Vegas Boulevard, the famous Strip – undisputed world capital of gambling, fornication, adultery, prostitution, immodesty, licentiousness, drinking, gluttony, vanity, ostentation and not a little taking God's name in vain when visitors' luck runs out in the gambling halls. The sheer amount of sin, as measured by any religion, is unfeasibly high in Las Vegas; for Muslims, it is off the scale.

Yet a flick through the Yellow Pages remarkably turns up four mosques. Masjid-e-Tawheed, the newest, set up just two years ago, is the only one that extends an invitation to discover Las Vegas's hidden Muslim life in a 10,000-strong community so unlikely that even visiting Muslims are astonished to find it exists.

It goes without saying that the United States as a whole is not the easiest place in which to be a Muslim, even though census figures show fractionally more people practising Islam – some 2.6m – than the more visible Jewish population of 2.3m. America's Muslim population has grown, too, from 1.5m to 2.6m since 9/11, increased, it is thought, by both immigration and people converting.

Despite their love of religion, Americans are still as jittery about Islam as, broadly speaking, Islam is jittery about Americans. In Las Vegas, one would imagine, the locals, not always known for liberality or sophistication, would be hostile – especially when Islam opposes everything Las Vegas does for a living.

Masjid-e-Tawheed's founder and leader is a charming and charismatic 45-year-old originally from Afghanistan, Ahmadullah Rokai Yusufzai, or Rocky to most non-Muslims he meets. With a Bluetooth headset in his ear and a Mercedes with "Allahu Akbar" – God is great – on its number plates, Yusufzai could win any prize as model immigrant.

Yusufzai, who fought the Soviets with the mujahideen as a young teenager, works as a court interpreter, helps train Marine units going to Afghanistan, is a volunteer soccer coach, and has brought up his children to be diligent, patriotic, success-oriented young Americans.

Yet Yusufzai has had a tough time since coming to the US with his parents 30 years ago, made tougher, one cannot help thinking, by settling in Vegas. He was hounded out of his engineer's job with a telecommunications company within weeks of 9/11 – and this was a man easy going enough to regard being called a "camel jockey" and a "sand nigger" by his erstwhile colleagues as harmless banter.

Although college educated, he was prepared to try to make it as a cab driver, but found the company requirement to cheat tourists by "long hauling" them – taking them on unnecessarily long routes – more than he could morally accept. He also refused to take rake-offs from strip joints and brothels.

He later saw a modest rental-property business collapse in recession and had all his apartments repossessed. Today, as a successful and respected member of the wider community, he still accepts that his phones are periodically tapped. The FBI visits him regularly to check up on what's going down at the mosque and if he thinks any of the congregation, who range from doctors to taxi drivers, Somalis to Pakistanis, Sunni to Shia, might be terrorists intent on blowing up the nearest titty bar.

"I always tell the FBI guys that if there were, I'd be calling the FBI myself, but they still come by. We are trying to have a better image of Islam. We're not going to harbour or support anybody who even thinks about that," Yusufzai says.

Living the dream: neon signs advertising casinos and hotels on Freemont Street in Las Vegas. Photograph: Corbis

These are probably the travails of any high-profile Muslim in the States. Then there is the incongruity of living in these difficult years in Las Vegas. Take the time when Yusufzai ended up towing a trailer up and down the Strip, advertising an adult-entertainment club. "I was towing this with licence plates that read Allahu Akbar, listening to the Qur'an, and yet I'm hauling this thing and praying to God to forgive me and to understand I'm just trying to put some halal food on my table without being dishonest and making 'easy money', as it's called in Vegas. I still didn't feel comfortable. It was halal money I was making, but I had to hand back the trailer. It just wasn't right."

For Muslims, or anyone coming from poor contries, the lure of Vegas tends to be down to a combination of plentiful, if often distasteful, employment, low taxes and a low cost of living. "A job in a hotel can pay for a 2,000sqft home and two cars," says, Yusufzai. "A taxi driver or a black-jack dealer earning $60,000 can earn enough for a house, cars and schooling.'

Yet plenty of Muslims gamble. They come, he admits, in the hope of winning big at a casino after studying from the inside how they work. He has not heard of a case of such a plan working out – but he has heard of people who have lost all the money they have earned in the casinos at the same establishments' tables – and even committing suicide as a result.

"This town originally got me hooked not because of gambling, but because at any time of the day and night you could go and grab a bite to eat, there's something open. That's what I was used to in Afghanistan – getting up at two in the morning and saying, 'Let's go have some tea, get a kebab.'"

He describes pioneer days in the 1980s, when there weren't enough Muslims to fill one mosque, and to get halal meat, "we would go out of town, go to a farm, buy the animal and sacrifice it ourselves".

Even today, Masjid-e-Tawheed doesn't have an imam. "We have two brothers who have learned on their own. They aren't certified imams who've gone to madrassa or Qur'an school, but," says Yusufzai, "one is a baker in the casino, making pastries, and also works for a bagel factory. The other one is a courier and a cab driver.

‘We try to take the time to come to God and get away from all the bad stuff’: worshippers outside Masjid-e-Tawheed. Photograph: Jonathan Margolis for the Observer

"We are criticised by other Muslims. They'll say, 'You're living in Sin City? You must have a gambling problem. You must be doing this and that.' And we say, no. That's what happens on the Strip, but two miles radius of that, there's no casinos. It's just suburbia, ordinary families trying to live decent, good lives. Most Muslims stay well away from the Strip. My house is about 15 miles away and it's a different world. I see the lights way off in the distance.

"Muslims ask me how I feel about having bartenders and casino workers in our congregation," he adds. "I tell them, we all go to our own grave. I can't judge that person and say you can't be a bartender. I can suggest a better Muslim needs to do things that won't harm anyone. I will say what they're doing is wrong, but I can't stop anyone doing anything.'

What about the CHILDREN? Does Yusufzai not worry about young members of his congregation developing a secret life when the highest density and quality of temptation in the world is a short bus ride away? His own daughter, 11-year-old Medinah, seems thus far immune to the charms of Las Vegas Boulevard. As we are driving home down the Strip after taking the photos of the Yusufzai family by the famous Las Vegas sign, she shudders, and says, "Bad things happen here." I ask what sort of things. She shakes her head. "I don't even want to think about it," she says. Subject closed.

But, as her father admits, "It's easier to get lost in this city than anywhere else in the world. You get to the Strip, you can get a fake ID and go into any club and do whatever you want. Drinking has become a major thing for teenagers. The parents are mostly in denial. They never believe anything has happened. But the parent role in this city is also extremely tough and challenging. I don't believe in punishment – that's just being pissed off and reacting to your own emotions, but I have to explain that in this city as a Muslim in the sin capital of the world, it's difficult.

"Some first- and second-generation women in particular have lost themselves, from being in a wider community that exposes them to so much negativity and the material side of the world, and they think selling their body in various forms is the best way to make money fast.

"There are girls who work in adult-entertainment clubs dancing and more because they want to make the money. And there are girls who are cocktail waitresses. They've taken themselves away from the community, the mosques, the family and used an American name. Some families even know what their daughters are doing. They say, because this is America, we can't discipline our children or punish them, because they'll call the cops on us. And that's happened. The saddest apart of my job is going to a family court and seeing a Muslim family there. It tears me up, whether it's domestic violence or a young girl doing stupid things she shouldn't be doing.

"Another scenario," Yusufzai continues. "Concerns a beautiful girl in her 20s, who volunteered for jobs here at the masjid. She started crying, and said, 'I don't know how to pray. My parents never taught me. They were strict with the rules and laws of the culture, but not about Islam. They were too busy making money.'"

He invites me to the Friday service, where I meet some of Las Vegas's hidden Muslims – though sadly none of the women, whose views on whether the nearby "attractions" of the Strip perhaps even represent some form of liberation, or social progress, would be fascinating. Muhammad Chakir, from Morocco, works as an assistant manager in one of the biggest casinos, "right in the middle of the whole thing", as he says. "Other Muslims think it's crazy that we're here, but we try really hard to take the time to come to God and get away from all the bad stuff. We don't have a problem with living in Vegas. For me, the diversity of the place, the fact that people from everywhere come here, makes it easier to be a Muslim, not harder. There's a lot of sin going on. But to be able to get away and pray and be peaceful here is fantastic."

Chakir admits he has gambled, but only when he first visited Vegas. "Once you take that road, once you start putting money into the machines from your pay cheque, you need to leave this city," he tells me. Another casino worker, Muhammad Muner, is from Afghanistan, and wearing an "I'm proud to be a Muslim" T-shirt. "Vegas is no problem," he tells me. "This is the United States and we have freedom of religion. They don't say it for nothing."

Rashid Mouawia, a kitchen cleaner from Morocco, will happily wear traditional dress on the Strip if, he says, he's in the mood. "You really don't feel discrimination as much as in other cities. The diversity helps.

"People thought it was crazy moving to Vegas," he tells me. "When I started my job, some people had ideas, stereotypes, about Muslims, that we're all terrorists, or that we're all rich. But when they get to know you, you get respect. You know, I think a lot of us don't just tolerate this town, we actually love it."