Suella Braverman’s Home Office is facing a judicial review of the treatment of people detained in the Manston immigration centre.
The news comes after it emerged that families were being kept there for weeks in overcrowded conditions in which disease has spread.
Sources confirmed that a letter had been received by the Home office starting legal proceedings on behalf of a charity, and focused on an individual who has been held in Manston for weeks.
The letter will challenge the legality of the situation inside the facility.
It comes after Braverman faced intense pressure over the centre, in which people are only meant to be held for 24 hours while their cases are processed.
Sources told ITV news that the home secretary was keen to avoid the use of hotels to move detainees into, claiming that it added to pressures which resulted in the site holding 4,000 people, when it is meant to have a maximum of 1,600.
Braverman insists she never blocked hotels, but was clear that she disagreed with the expense used.
Sources said she looked for alternatives like student accommodation and holiday parks, and asked for an assessment of whether people could be tagged during their release.
Want a quick and expert briefing on the biggest news stories? Listen to our latest podcasts to find out What You Need To Know.
Many at Manston will go on to apply for asylum, but the home secretary believes many are economic migrants who have entered the country illegally.
Sources told me Braverman was shown legal advice from inside her department, making clear that the delay in moving people out of Manston meant she was breaking her statutory duties.
She insists she never ignored legal advice and always took it into account, but sources told me she disliked it and said it was "flawed".
She also asked for a second opinion from barrister Sir James Eadie - who advises the government on national issues - I'm told.
Apparently she told colleagues that a second opinion would help protect the department in the case of a judicial review.