The professional body for Scotland's solicitors has called for wide-ranging reforms to the way legal services are regulated.
The Law Society of Scotland claims the current regulatory framework is "in drastic need of modernisation" and is "no longer fit for purpose".
It has put forward 11 recommendations for change to an independent review of legal services regulation.
They include overhauling the legal complaints system.
The organisation argues the current system is "complex and confusing".
It has called for the creation of an independent legal role which would have oversight of the Scottish Legal Complaints Commission (SLCC).
'Protect lawyer term'
Other recommendations include new powers to suspend solicitors suspected of serious wrongdoing and expanding consumer protections to areas of legal services that are currently unregulated.
The society is also calling for the term "lawyer" to be protected, in the same way the word "solicitor" is. It is a criminal offence for anybody to pretend to be a solicitor but there are currently no such restrictions around the use of the term "lawyer".
It also recommends that any new regulatory system "makes provision for the regulation of legal services provided remotely by artificial intelligence (AI)".
Graham Matthews, president of the Law Society of Scotland, said the society had identified 50 sections of the 1980 Solicitors (Scotland) Act which were "problematic and not fit for purpose".
He added: "There has been enormous change within the sector in recent years and the current system - some of which is almost 40 years old - is struggling to meet the demands of today's fast-changing legal market.
"That's why we have called for completely new, flexible legislation which will allow much needed reforms and ensure we have a regulatory framework that is fit for purpose, addresses the challenges of modern legal practice - from cross-border working to technological advances enabling AI legal advice - and which puts protecting consumers at its core over the long term."
An independent review of the regulation of legal services was announced by Legal Affairs Minister Annabelle Ewing last April.
A Scottish Government spokesman said: "The independent review of legal services will consider what changes may be needed to the regulation of legal services to protect consumer interests and promote a flourishing legal sector.
"We are grateful to the Law Society for their contribution ahead of the review being completed later this year. Ministers look forward to receiving the report and will consider its recommendations in due course."