The Welsh Government plans to take the UK government to court over a new law that sets the rules of trade between different UK nations after Brexit.
Counsel General Jeremy Miles welcomed last minute changes to the law but said they did not address the "fundamental concern" that the Internal Market Act could constrain the Senedd's powers.
The UK government said the law was "vital" to protect Welsh jobs.
The leader of the Conservatives in the Senedd, Paul Davies, accused the Welsh Government of "still fighting old battles".
The purpose of the act is to allow goods and services to be traded on a level playing field across the UK nations even if different standards are set by the UK, Welsh, Scottish and Northern Irish governments.
Boris Johnson's government said it wanted to avoid different regulations emerging in the UK's four nations after the Brexit transition period ended on 31 December.
But there are concerns quality controls could be dragged down to a lowest common denominator and the ability of the Welsh Parliament to set its own legislation would be hindered.
Following a number of defeats by the House of Lords, the UK government made changes that will allow the devolved governments agreed divergence from internal market rules through so-called common frameworks.
Speaking on BBC Politics Wales, the counsel general said the changes had "improved" the bill but "the fundamental concern which we had was not addressed".
Mr Miles, a Member of the Senedd (MS), said the Welsh Government was "now in the process of preparing" its legal case.
"Nobody wants to be in this situation," he said.
"I was very clear that we wanted changes made to the bill but the bill was not changed in the way that we wanted.
"We heard back from the UK government about a week ago and I'm afraid the concerns that we had as a government were not addressed in the letter.
"We've been very clear from the start that we will take any opportunity and all the levers that are available to us as a government to be able to protect the devolution settlement," he added.
Mr Davies MS said the Welsh Government "need to move on".
"I think the Welsh Government are still fighting old battles," he told the BBC Politics Wales programme.
"What the Welsh Government should be doing is promoting Welsh businesses, making sure that Welsh businesses take the opportunities now that are available to them, not just with our European friends but across the world."
The UK Government said it was "disappointed" at the Welsh Government's stance, saying the relationship during the passage of the Bill had been productive.
"This vital Act will protect Welsh jobs, businesses and livelihoods - and has won cross-party support, including a number of Welsh MPs in Parliament," said a spokesman.