Britain was "in danger" of breaking the law over its processing of asylum seekers, a former Home Secretary has said.
Grant Shapps revealed he had received "very clear" advice that the Government was on the brink of law-breaking at the Manston facility during his six-day stint at the Home Office last month.
Reports of outbreaks of disease and severe overcrowding at the processing centre in Kent triggered an outcry, piling pressure on crisis-hit Home Secretary Suella Braverman.
Ms Braverman has insisted she did not ignore legal advice over the length of time asylum seekers were being held at the centre.
But Mr Shapps, who is now the Business Secretary, said there had been concerns that people were being "unintentionally detained" at the site, which would not have been legal.
It comes as Rishi Sunak was due to meet French President Emmanuel Macron for crunch talks over the Channel migrant crisis at the COP27 climate summit in Egypt.
Mr Shapps was made Home Secretary by Liz Truss last month after Ms Braverman was forced out for breaking ministerial rules by sending sensitive documents using her personal email.
She was controversially reappointed six days later by the new Prime Minister Rishi Sunak.
Asked why he was keen to move migrants into hotels while he was in the role, Mr Shapps told Sky News: "Simply that we've got to be careful not to break the law ourselves by detaining people who are able to be outside of that - well, it's not a detention centre, but a processing centre - at Manston.
"So, really just a question of making sure that we were acting within the law. That's something that the Home Secretary is continuing to do now."
Pressed on whether that meant the Government was breaking the law previously, he added: "The advice I had was very clear - that we were in danger of doing that if we weren't acting. I did act during six days in the job."
He said he did not see the advice given to Ms Braverman during her first stint in the job but the site was "tipping into becoming an unofficial detention centre" when he was appointed.
Mr Shapps told BBC Breakfast: "During that ... six days what I saw was a situation whereby a centre that was set up to be a processing centre - now this is at Manston airport in Kent - was tipping into becoming an unofficial detention centre.
"I was very keen to ensure that we ... maintained ourselves within the law, had some very clear advice on that and made a number of changes - both moving people out but also the running of the centre itself to ensure that it wasn't a detention centre, so some changes to the operation of the centre.
"Those are decisions that I very quickly made. Actually, the Home Secretary subsequently has continued to make the same changes to make sure that those numbers are brought down."
Mr Sunak is expected to raise the Channel crisis with his French counterpart when the two meet for the first time in Egypt today.
Ahead of Cop27, the Prime Minister told The Sun that his "key priority" at the UN climate change conference was resolving the crisis of small boats crossing the Channel.
"I have spent more time working on that in the last few days than anything else other than the autumn statement," he said.