Transport Secretary Grant Shapps has been caught up in his own department's rule change while on holiday in Spain.
The cabinet minister travelled to the country with his family on Saturday morning for a summer break.
But just hours later, the Department for Transport confirmed all travellers returning to the UK from Spain would have to quarantine for 14 days, due to a spike in cases in the country.
A DfT spokesman said Mr Shapps would continue with his holiday as planned.
He will then isolate upon his return, in line with the new rules.
On Sunday afternoon, Mr Shapps tweeted that he had held a video call with UK airlines and the British Ambassador to Spain about the rule change.
Following the unexpectedly rapid rise in Spain's #coronavirus cases, I held a video call with UK airlines + our Ambassador @HughElliottUK today in order to ensure close coordination to help UK nationals return from Spain. We will all need to quarantine for 14 days on arrival.— Rt Hon Grant Shapps MP (@grantshapps) July 26, 2020
Foreign Secretary Dominic Raab said he spoke to Mr Shapps after he had arrived in Spain on Saturday, and that his colleague "recognised we had to take the measures".
Mr Raab told Sky's Sophy Ridge on Sunday the transport secretary "empathised with the many other people" who were experiencing the same thing, adding: "I think it shows you the risk for everyone... and shows you we have got to take swift measures."
More than 900 cases of coronavirus were reported in Spain on Friday, and the country's officials are warning of fears of a second spike.
Another Tory MP, Minister for London Paul Scully, has been affected by the changes.
Mr Scully - who is also the small business minister for the government - posted pictures on Instagram from a holiday in Lanzarote on Saturday, saying he was due to come back to the UK in August.
On Sunday, he posted it was "worth it", saying he would "still be able to work" on his return, "just no shopping or running".
The Department for Business, Energy and Industrial Strategy confirmed Mr Scully was in Lanzarote and would be isolating on his return to the UK.
It is not known where Mr Shapps is staying, but quarantine measures apply to all those returning from mainland Spain, the Canary Islands and the Balearic Islands, such as Majorca and Ibiza.
Travellers have been advised by the government to follow the local rules, return home as normal, and check the Foreign Office's travel advice website for further information.
The Foreign Office is now advising against all but essential travel to mainland Spain.
Labour's shadow health secretary Jonathan Ashworth said "you couldn't make it up" that Mr Shapps was on holiday in the country while being in charge of the department announcing the rule change.
He told Sky's Sophy Ridge on Sunday programme the government's re-imposition of the quarantine rules was "shambolic", adding: "I think that tells you everything about the government's approach to this."