The leader of the Scottish Conservatives has insisted that the UK government will be able to find a new senior law officer for Scotland.
Lord Keen quit as advocate general on Wednesday over new post-Brexit legislation which ministers admit would break international law.
There have been claims that the government may struggle to find anyone willing to replace him.
But Douglas Ross said he believed there would be a "number of good candidates".
In his resignation letter to the prime minister, Lord Keen said he had "found it increasingly difficult to reconcile" his obligations as a lawyer with provisions in the Internal Market Bill which would allow the government to override parts of the UK's Brexit deal with the EU.
It subsequently emerged that Downing Street had reached a compromise deal with some Tory MPs who had similar concerns about the legislation and who were threatening to rebel.
The government had already seen the departure of the head of its legal Department, Sir Jonathan Jones, who quit last week as the bill was announced.
In an editorial published earlier this week, the Scottish Legal News website said that anyone defending the bill was endorsing "reckless and lawless behaviour that will tarnish Britain's reputation and ultimately that of those associated with it."
And SNP MP Joanna Cherry has said she believed the prime minister would therefore "find it hard to find anyone of suitable seniority at the Scottish Bar" who was willing to replace Lord Keen.
The advocate general is the chief legal adviser to the UK government on Scots Law.
Speaking to the BBC's Good Morning Scotland programme, Mr Ross said he was confident there would be a "range of very good candidates" and dismissed suggestions that the UK government would not be able to fill the vacant post.
Mr Ross, who voted in favour of the bill on Monday, added: "I do not believe that is a situation we will get ourselves in - there will be another advocate general for Scotland.
"I believe there are a number of people qualified to replace Lord Keen.
"He has done an excellent job in government, it is an important role and I think there will be a number of good candidates for the government to look at to replace him as advocate general for Scotland."
The leader of the House of Commons, Jacob Rees-Mogg, later told MPs that there were "many brilliant Scottish lawyers who can be found who can be asked to fulfil the role of advocate general".
He added: "The pool of wisdom in Scottish legal circles is very deep and I have absolute confidence that we will find someone of comparable genius to the noble lord to take the role that has been vacated."
In his resignation letter, Lord Keen said that the government "faces challenges on a number of fronts and I fear that the internal market bill in its present form will not make these any easier".
It came after Northern Ireland Secretary Brandon Lewis told MPs that parts of the bill would break international law in a "specific and limited way" by giving the government the power to override parts of its withdrawal agreement with the EU.
Prime Minister Boris Johnson has since agreed to amend the bill to give MPs a vote before he could use the powers in it that would break international law in order to head off a potential rebellion next week.
Mr Ross said the controversial provisions would now only be used as a "safety net" if the government was able to persuade MPs that it was necessary to do so because the EU had broken its treaty obligations.
And he insisted that the bill was needed to help protect 545,000 jobs in Scotland, which he said were dependent on the internal market of the UK.
The bill has provoked a backlash from the EU, which has threatened legal action - and the possible suspension of trade talks - if it is not withdrawn.
And it has been heavily criticised by opposition parties including Labour and the SNP, who have pledged to continue opposing it.
What is the Internal Markets Bill?
The bill sets out rules for the operation of the UK internal market - trade between England, Scotland, Wales and Northern Ireland - after the end of the Brexit transition period in January.
- No new checks on goods moving from Northern Ireland to the rest of Great Britain
- Giving UK ministers powers to modify or "disapply" rules relating to the movement of goods that will come into force from 1 January if the UK and EU are unable to reach an alternative agreement through a trade deal
- Powers to override previously agreed obligations on state aid - government support for businesses
The bill explicitly states that these powers should apply even if they are incompatible with international law.
Ministers say the legislation is needed to prevent "damaging" tariffs on goods travelling from the rest of the UK to Northern Ireland if negotiations with the EU on a free trade agreement fail.
But some senior Conservatives - including former Prime Minister John Major - have warned it risks undermining the UK's reputation as an upholder of international law.
The legislation has also proved controversial with the devolved administrations, which are concerned about how the UK's "internal market" will operate post-Brexit and who will set regulations and standards.