By Natalie Bloomer and Samir Jeraj

Yesterday, Theresa May spoke of giving a voice to those who have been "ignored or silenced for too long". She outlined a "British dream" where it doesn't matter "where you are from or who your parents are". Today we reveal how skin-deep this rhetoric really is, as we document the attempts she made as home secretary to discriminate against the children of undocumented migrants in the school system.

Since last year, new government rules have meant that schools across England have been collecting data on the country of birth and nationality of their pupils. Immediately, the policy caused problems. Reports emerged of staff wrongly demanding to see copies of passports and asking parents to confirm their child's immigration status.

What looked at first like a badly thought-out policy soon became something more sinister. It was revealed that the Department for Education had made an agreement to pass on details of 1,500 children a month to the Home Office for immigration enforcement.

This arrangement was actually a watered-down version of a far more draconian project initiated by May when she was home secretary.

In 2015, then education secretary Nicky Morgan wrote to David Cameron to warn against Home Office plans for undocumented children. Published extracts of Morgan's letter made it clear that May wanted schools to carry out immigration checks on pupils and put the children of undocumented migrants to the back of the queue when it came to admissions.

"I have concerns about the practical and presentational issues of applying our strong position on illegal migrants to the emotive issue of children's education," Morgan wrote. "These cover deprioritising illegal migrants in the schools admissions process, and carrying out immigration checks through schools. Introducing these checks could lead to some children not being registered for school because of real or perceived fear of deportation."

While May wasn't successful in pushing through those changes, the collection of nationality data started shortly afterwards

Thanks to pressure from campaigners like Against Borders for Children, the government confirmed earlier this year that information about nationality would no longer be passed to the Home Office and parents who previously provided the information would have the right to retract it.

"The damaging impact when trusted services like schools share data with the Home Office cannot be overstated," Fran Zanatta, a spokesperson for Against Borders for Children, says. "Children will be withdrawn from school and denied an education because of the climate of fear the Home Office is intentionally creating."

But while May's initiative to introduce immigration enforcement to schools was not successful, the government did put children at risk when it came to healthcare.

Frances Travena, of the Coram Children's Legal Centre, tells of a woman who had lived in the country legally for nine years before incorrect legal advice led to her becoming undocumented. Her child later became ill and needed ongoing treatment. Because of her immigration status she had to pay for it - something she couldn't afford to do. She was then told by the hospital that they would no longer be able provide the child with the care they needed. Only life-saving treatment would be available.

"The hostile environment is damaging to children," Travena says. "The majority of families have no recourse to public funds, and live in constant financial precarity. Even where families are able to apply for benefits, many do not because they are afraid that accessing financial support will impact on their right to remain. This leaves children hungry and at risk of homelessness."

It's not just children who come to the UK with their parents who are affected. Unaccompanied children who arrive here, often after traumatic experiences, face huge uncertainty as they approach adulthood. Just before their 18th birthday, they must apply for extended leave to remain in the UK. This is often turned down. They then face a lengthy and complex legal process to appeal the decision. This is at the same time as having much of the support they received when they were classed as a child cut off.

For many of these children, the experience is deeply traumatic. They have no family or friends to return to in their country of origin. Many of them know no home apart from the UK. They speak and act like any other British child. But their immigration status puts them at risk of sudden removal.

"One of the outcomes of the 'hostile environment' is that coming of age for unaccompanied minors has become a major period of anxiety and insecurity," Dr Nando Sigona, a researcher on the refugee crisis, says. "Services are reduced drastically and abruptly. The fear of being deported back to their country of birth becomes an overriding consideration that affects their social life, educational results and mental health."

In 2012, it was estimated that there were 120,000 undocumented children in the UK. But between 2012 and 2015 only around 15% of them were regularised or left the country. The rest either got caught up in the Kafkaesque immigration system or fell into the shadows of society, where they are vulnerable to criminals, gangs and sexual predators.

Whether it is teachers being expected to act as border guards, children being turned away for healthcare, or unaccompanied young asylum seekers having their support cut, the impact of the government's policies are clear across society.

May's conference speech attempted to portray her record and that of her party as one of social justice, fairness and openness. It will come as a bitter joke to the children whose lives she targeted in her campaign against immigration

Natalie Bloomer is a journalist for Politics.co.uk. You can follow her on Twitter here. Samir Jeraj is a freelance journalist. You can follow him on Twitter here.

The opinions in politics.co.uk's Comment and Analysis section are those of the author and are no reflection of the views of the website or its owners.