Legality of first Welsh bill challenged at Supreme Court
The legality of the first bill passed by the Welsh assembly under new law-making powers is being challenged at the Supreme Court.
Attorney General Dominic Grieve claims the Local Government Byelaws Bill goes beyond devolved powers and wants the UK's highest court to overturn them.
The bill allows Welsh councils to make byelaws without ministers confirming them.
The case is expected to last three days with judgement before Christmas.
The UK Government has opened its case before five supreme court judges.
The assembly voted unanimously in July to pass the bill.
But Mr Grieve intervened to refer it to the Supreme Court before the bill could get Royal Assent.
He has asked the court to decide whether parts of the bill which change the functions of UK ministers to confirm some Welsh byelaws are beyond the assembly's powers.
If the court rules in his favour, it means the assembly would have to vote again on an amended bill removing these sections.
Betsan Powys, BBC Wales political editor
It's slightly surreal that five of the land's most respected judges are going to be discussing a law about cleanliness in tattoo parlours in Anglesey and the management of mortuaries in Monmouthshire.
The very first law passed by the assembly after last year's referendum was one that gives local authorities the right to make byelaws to deal with such things without having to refer to Welsh ministers.
The UK Attorney General is arguing that the law doesn't just remove the rights of Welsh ministers, it also takes away a part, albeit small, of the Welsh secretary's powers.
And this, says the Attorney General, goes beyond the powers given to the Welsh government by the Yes vote in the referendum and so is unlawful.
The Welsh government is adamant that it does not. Suddenly this is not about public toilets and tattoo parlours, it's about a full-on legal argument over how far devolution has gone.
It is significant in that there are far bigger, more complex and controversial pieces of legislation coming down the track, such as the Organ Donation Bill.
And it is judgements like this one over the next few days that will decide the scope of devolved powers in the future.
If the Welsh government wins then the bill will proceed for Royal Assent.
The bill is the first to be passed by the assembly since it gained law-making powers without reference to Westminster in the March 2011 referendum.
Speaking ahead of the case, the Welsh government's counsel general Theo Huckle QC said since devolution there had been little or no role of UK ministers in connection with Welsh byelaws.
He said: "I will argue that in practice in the case of the byelaws under consideration it has invariably been the case, in any event, that byelaws are submitted to the Welsh ministers for approval.
"We are not aware of any instances when the Secretary of State has been requested to confirm Welsh local authority byelaws.
"It is therefore the view of the Welsh government that the provisions of the bill to localise procedures for making, confirming and enforcing local authority byelaws brings the bill within the legislative competence of the National Assembly for Wales."
Letters released under the Freedom of Information Act show the UK government repeatedly warned the Welsh government over a period of months that it did not believe that some parts of the proposed bill were lawful.
But Welsh ministers declined to amend the bill or seek the UK government's consent before it put it to a vote in the assembly.