At least 60 illegal orphanages and children's homes in Uganda are being funded by UK charities, church groups and volunteers, the BBC has discovered.
The Ugandan government recently announced a programme to close down more than 500 unlicensed orphanages in the country.
The BBC attended the closure of one UK-funded home, where children said they had been beaten and neglected.
The Ugandan government urged UK donors to check who they are giving money to.
A BBC investigation found registered UK charities were funding and supporting dozens of the illegal orphanages on the Ugandan government's closure list.
Some said they did not realise the homes they were funding were illegal.
The government is shutting down unregistered homes to try and improve oversight of children's care in the country.
Some of the homes on the closure list also had volunteers visit from the UK.
On a muggy morning in December BBC Radio 4's File on 4 travelled to an area of south-west Uganda called Masaka to record the closure of one illegal home.
It was sponsored by donors through Patrick Oldham, a builder from Hyde, in Greater Manchester.
Mr Oldham lives part of the year in Uganda, going to the home and introducing the children to visiting volunteers. He uses social media to give updates and attract sponsorship.
Inside, 25 children who had UK sponsors were living in squalid conditions.
The open pit latrine toilets were flooding and there was no running water. One boy had been circumcised and was living with an untreated, painful infection.
Many of the other children also had skin infections which they say weren't being treated.
Following the raid all the children were returned to their families.
A government social worker, Maria Nagawa, said conditions there were the worst she had ever seen.
Social workers found tools, including an axe, lying of the floor of the orphanage
In Masaka, the BBC also met a woman called Laetitia - not her real name - who is a mother of six children.
After her husband died, she was struggling to raise money for her children's school fees when she was approached by a woman working for the orphanage in 2016.
Laetitia was persuaded to send her two youngest boys, then aged 7 and 5, to the home, where she was promised they would be given a top education.
Last spring, the boys were returned home by social workers who were concerned about their living conditions.
The eldest of the pair, now aged 9, told the BBC how his brother was beaten if he wet his bed.
"Whenever I tried to go and help him out, they would also beat me," he added.
Both boys said beatings were common at the home and that they even saw female members of staff melting plastic bags and using them to burn the children.
Laeticia says her eldest son also contracted typhoid from dirty drinking water at the orphanage.
A government social worker said conditions there were the worst she had seen
A Facebook group for the home, regularly updated with posts by Mr Oldham is called "Rock of Joy children's care".
The BBC investigation found that money was fraudulently raised for the home using the credentials of a charity with a similar name - The Rock of Joy Trust, also based in the North West.
The charity also operates in Uganda.
The founders of the genuine Rock of Joy Trust said the fact their name was being used in connection to the illegal orphanage was appalling and extremely upsetting.
A response on behalf of Mr Oldham said: "Any personal allegations are refuted, we are considering the possibility of legal action.
"It is our understanding that some children remain and it is paramount that we both protect and secure their future."
An open pit latrine toilet flooded the floor outside the building
The permanent secretary of the Ugandan ministry responsible for children Pius Bigirimana warned UK donors against giving money to orphanages without official checks.
He said: "If you are interested in supporting these children, don't just go put money into a home which is unlisted.
"Why don't you assist the family to look after the children instead of looking at an institution?"
The UK charity Hope and Homes for Children is assisting the Ugandan government in its work to keep children in their families, rather than living in institutions.
Its chief executive, Mark Waddington said the number of children living in orphanages in Uganda had grown from just under 2,000 in the 1990's to more than 55,000.
He said orphanages were now seen as "an economy".
"We are seeing children being conned out of households, with their parents being persuaded under the offer of a Western style education," he said.
"They are used literally as commodities to raise funding."