A BBC investigation has found that Thailand, a country known for its hospitality to tourists, routinely arrests and detains asylum seekers. Many are Pakistani Christians who have fled religious persecution in their own country. Some are children. And they are held despite being UN-registered asylum seekers, whom the UN is under a duty to protect.

The sound of the faithful in prayer and song bursts out of a small rented room where a congregation of more than 100 people have gathered for Sunday mass.

They would be risking their lives to worship like this in their homeland, where Islamist extremists force Christians to convert, or even kill them.

Leading the prayers is Pastor Joshua, a Christian from Lahore, in what is officially known as the Islamic Republic of Pakistan. Along with thousands of other Christians, he's had to flee to Thailand and still fears the people in Pakistan who punished him for converting from Islam to Christianity.

"My bone was broken - the one right above the heart. And they tried to cut my arm off," he says.

"My sister was murdered, she was burned alive, just because she spoke the word 'God'. They hate the word 'God' so much. She was burned for this reason alone."

The Pakistani Christians head to Thailand because it's easy to enter the country on a short-term tourist visa and in Pakistan's hostile neighbourhood there are few safe options closer to hand.

But there is hardly a welcoming committee in Thailand. The country doesn't want asylum seekers from anywhere. It is not a signatory to the United Nations Refugee Convention, and anyone without a valid visa or a work permit risks being arrested, charged with illegal immigration and jailed.

Image copyright AFP Image caption A Pakistani man arrested as an illegal immigrant is released on bail in 2011

Thailand has allowed the UN refugee agency, the UNHCR, to step in and investigate the credibility of those claiming to flee persecution - a process with two possible outcomes, either repatriation or relocation to another country. But many of these families say they've been waiting years to be assessed by the UN and they have no access to work, education or healthcare.

As they await the outcome of their case, thousands of Pakistani asylum seekers set up temporary home in dingy rooms in a network of tower blocks on the outskirts of Bangkok. People who were once comfortably-off professionals arrive with just a few possessions, their rent and food paid for by local Christian charities.

And they live in constant fear.

Media playback is unsupported on your device Media caption Many of those held are Pakistani Christians

The Thai immigration police have lost patience with the UN's failure to process asylum cases in good time, one young father tells me, holding a 25-week-old baby in his arms.

"They are taking people out of the rooms from everywhere, they can strike at any time, there is always tension," he says.

I hear that the immigration police are raiding a block of rooms close by, so I go straight there and find dozens of women crying and clutching their children.

The police have just broken down the doors and taken away all their husbands. Women and children were also taken from other blocks. All told, more than 50 Pakistani asylum seekers have been arrested.

I find them at the local court, where they are handcuffed, charged with illegal immigration, fined 4,000 Baht (£90) and then sent to Bangkok's Immigration Detention Centre.

Find out more

The names of most interviewees have been changed, for their safety

Chris Rogers reports for Our World: Thailand's Asylum Crackdown on the BBC News Channel on 27 and 28 February at 21:30 GMT and BBC World News starting on 26 February (click here for transmission times)

on the BBC News Channel on 27 and 28 February at 21:30 GMT and BBC World News starting on 26 February (click here for transmission times) Viewers in the UK can catch up on the BBC iPlayer

This isn't supposed to happen. All registered asylum seekers are issued with a UN document, which certifies them as an "internationally recognised UN person of concern". This means they should not be arrested or detained for seeking asylum while the UN investigates their case.

Earlier I met one man called Sabir, who fled Pakistan two years ago with his wife, Laila, their two daughters, Laila's parents, and her siblings and grandparents. They shared a small, sparse room with no kitchen or toilet, all 10 of them - until Laila was arrested two months ago.

Image caption Sabir in the block of flats he rarely leaves

Sabir hasn't seen her since and sobs that he is lost without her. He doesn't regret leaving Pakistan though, where he says a gang threatened to kill his family if they didn't convert to Islam. "Over here, the only fear we have is of the immigration police, nothing else," he says.

But the UN won't investigate his asylum case until 2018. He says he's been told there is a backlog.

In a statement to the BBC, the UNHCR admits it is struggling. "Amid the context of today's acute global humanitarian funding crunch, it is correct that at present we are facing long delays in the processing of asylum claims with funding for Thailand at only a third of the level needed." But it adds that it has managed to prevent the arrest of more than 400 "people of concern to UNHCR" in the last six months, by insisting on their status as registered asylum seekers.

Meanwhile the Thai government complains the UN's inactivity is "creating far-reaching impacts on its security" - a reference to Thai fears that immigrants from Pakistan could be involved in terrorism - "leading to a number of arrests of illegal immigrants in the past year".

Anyone arrested - Sabir's wife, for example - is taken to Bangkok's filthy and overcrowded immigration detention centre.

Image caption Inside the detention centre - faces have been blurred for anonymity

Journalists and cameras are not allowed inside but volunteers delivering much-needed fresh water and food for inmates are, and that is how I enter, with other members of the BBC crew. Wearing search-proof hidden cameras we nervously pass through security checks and hand over our water and food to be checked by the guards.

We are led to a large, stiflingly hot room, crammed with hundreds of asylum seekers pressing their faces against a wire-mesh internal barrier. They are nearly all Pakistani Christians. For one hour a day, some of the 200 asylum seekers held here are let out of their cells to see visitors.

The men are semi-naked. Unaware we are BBC journalists, they tell us it's the only way to keep cool in the overcrowded cells they're kept in. The women cradle their children and babies. Many complain their children are suffering from diarrhoea and vomiting because of poor sanitation and dirty drinking water. The room gets noisy as the inmates cry out to the visiting charity workers for their help to get released, but food and clean drinking water are all they can offer. One mother tells me she has been here for three months with her children. "The youngest is three and the eldest is 10. They are finding it very difficult being here, they are getting so ill," she says.

Media playback is unsupported on your device Media caption Secret filming inside Thai detention centre

The Thai government says parents "often choose to have their children with them while in detention".

Yet the country has signed up to a number of UN international laws governing the humane treatment of prisoners and outlawing the imprisonment of children - particularly in centres holding adults.

None of the detainees I speak to have received legal assistance from the UNHCR since their arrest.

"We have no faith in the United Nations," 19-year-old Nazeem tells me, as she holds on to her baby cousin. "We only have faith in God. He will bring us freedom."

Their only way out of detention is for local charities to request bail from the Thai authorities. It costs about £900 ($1,250) to release one person, so they do this only for those deemed most vulnerable.

There are no official figures for the numbers arrested, but campaigners say it amounts to hundreds every month. It's alleged that 132 Pakistani Christians were arrested on one day alone in March last year. Altogether there are an estimated 11,500 Pakistani asylum seekers in Thailand, more than from any other country except Myanmar.

Suddenly I come across a young woman I was hoping to meet. There on the other side of the security cordon is Laila, Sabir's wife. It's an emotional meeting - she is obviously desperate to see her family. "I miss them, bring my daughters here so I can see their faces," she pleads. But the only way she is likely to see children for the foreseeable future, is if they are arrested too.

In its statement to the BBC, the UNHCR says it is working with the Thai government to find a solution. "Better and more humane management of the situation must be found in accordance with international legal norms," it says.

The Thai government insists that it strives "to provide the best possible care… based on international humanitarian principles."

Yet it inflicts an even worse fate upon some Pakistani Christians and their children. Those who are unable to pay the 4,000 Baht fine after they are arrested are thrown into one of Thailand's notorious jails.

This happened last year to a group of 20 Pakistani men, women and children. Separated from the women, the men's heads were shaved, and their ankles and hands placed in shackles.

"We had a lot of problem sleeping, sitting, standing up and walking," says one. "The chains weighed about 4kg or 4.5kg, and we used to have injuries on our ankles. We were in a lot of pain. It was very difficult for us."

One of his cellmates, Daniel, bursts into tears when he describes how the men were searched. "All we had to wear for clothing was a small piece of cloth," he adds.

The people charged with assuring the protection of these UN-registered asylum seekers were nowhere to be seen.

It was a local missionary who eventually bought their freedom.

But remarkably, Daniel is still able to invoke his faith's humility and forgiveness.

"Jesus said to us, 'If someone troubles you, don't ask for curses for him, instead, you should ask for blessings for him.' So, we ask for blessings for the UNHCR."

Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.