The first time you see a child hunched over a sewing machine in a hot, airless factory will never leave you.

The boy, no more than 11 or 12, peeked up at me with just the trace of a smile before he dipped his head again, back to work. It felt like a punch in the gut.

I'd been told that child labour was endemic in Turkey. But I wasn't prepared for the reality of it. Or the scale of it. One basement workshop was almost entirely staffed with children, many of whom couldn't have been more than seven or eight years old, the very picture of Dickensian misery.

I was in Istanbul investigating allegations that Syrian refugees and children are being exploited by the garment industry. And specifically that many are working on clothes destined for our High Street.

This undercover investigation was unusually tricky. Secret filming is illegal in Turkey and we were halfway through our investigation when a state of emergency was declared in the country. We were routinely stopped and questioned by police. Our secret filming equipment had to be kept out of sight.

Image caption Panorama found this young boy working in cramped and airless conditions

And yet finding Syrian refugees and children making branded clothes for the UK market was relatively straightforward.

Only a tiny percentage of the estimated 3 million Syrians who have sought refuge in Turkey have the necessary work permits. To survive, they have to work illegally, without any rights, and for low wages. A made-to-measure workforce for the garment industry, and a reminder that one person's plight is often another's opportunity.

I was able to see how this exploitation works for myself. It was just before 08:00. A group of people had gathered on a street corner on the outskirts of Istanbul, all desperate for a day's work.

We filmed through the blacked-out windows of our van a dozen yards away as a middleman picked this day's workforce, selecting them one by one. Those who were chosen boarded a bus to take them to a factory.

We know now that up to seven of the workers on board were Syrian refugees. One was just fifteen. Another, we'll call him Omar, was our source.

We followed behind until the bus stopped outside a factory in an industrial zone a few miles away. This factory was known to us. We'd been told it made clothes for some of the world's leading brands.

Later that evening, Omar met up with me. He showed me the labels from the clothes he'd been working on, that day. I recognised them instantly. So would you. The brand could hardly be better-known in the UK.

Image caption A 15-year-old boy showed Darragh MacIntyre British brand labels that he was working on

Over the next few weeks, I got to know Omar and his friends. Like all the Syrians I spoke to, they knew they were being exploited, but they knew there was very little they could do about it.

Some of them were being paid a little over £1 an hour, well below the Turkish minimum wage. The 15-year-old boy told me he wanted to be in school but he couldn't afford not to work. So he was spending more than 12 hours a day ironing clothes that are then shipped to the UK.

All the brands I contacted about this programme say they regularly inspect the factories making their clothes to guarantee standards. Some of these audits are unannounced. But the Syrian boys explained how the factories got round this problem.

When the auditors arrive, they are hidden out of sight. And when the auditors leave, they go back to work. As simple as that. Some of the brands acknowledge the inherent failings in the auditing process and are now trying to tie up with trade unions and NGOs to combat abuses.

Image caption Panorama filmed secretly at a garment factory in this building

Other factories may never be visited by auditors because as far as the brands are concerned, they don't make their clothes. They're part of the chain of sub-contractors who make up much of the garment industry in Turkey.

They take orders from so-called first-tier factories - official suppliers to the brands - but often without the knowledge of the brands themselves.

This is where you'll find the worst abuses of Syrian refugees and children. We decided to follow delivery vans from one of the first-tier factories hoping they would lead us down their supply chain.

Our plan was successful but also darkly disappointing. We filmed outside one of the sub-contractors as a small boy carried and dragged bags of material as big as himself to one of the vans. He couldn't have been more than 12.

We go inside posing as the owners of a new fashion business. In the manager's office we immediately spot a jacket that has been made for a British clothing retailer. It's whisked away. Later, after browbeating the owners to let us see the factory floor, we get sight of the young boy again.

He's carefully folding clothes at an ironing station. He looks up briefly and then looks down to his work again. And he's far from alone - there are half a dozen Syrian children of around his age in the workshop.

Image caption Like many parents this mother has no choice other than to send her children to work

Efforts are being made to get them into education but it's estimated that as many as 400,000 are working, many of them in the garment industry.

I've spoken to some of the parents of these children. They don't want their kids working, but they say they simply don't have a choice.

One boy, just 13, told me he was between jobs. He had spent the morning looking for work when we spoke. No luck. I asked him what he would do now. Tears rolled slowly down his cheek as he told me that if he didn't work, he couldn't live.

Our evidence confirms that big fashion brands are profiting from refugees and their children. All the brands involved say they are completely opposed to child labour and any exploitation of Syrian refugees.

But our investigation shows they sometimes don't know how or where their clothes are being made. And until the brands know exactly who is making their clothes, then this type of exploitation is almost certain to continue.

Panorama - Undercover: The Refugees Who Make Our Clothes is on BBC One at 20:30 BST on Monday, 24 October and available on the BBC iPlayer afterwards.