The Scottish Child Abuse Inquiry has heard that then-first minister Alex Salmond and other senior Scottish government figures were against it being set up.
Deputy First Minister John Swinney told the inquiry there had been clear division over the issue.
He said an inquiry was only authorised "after the change of first minister had taken place".
Mr Salmond has been approached for comment by BBC Scotland.
The inquiry was set up in October 2015 and is investigating the abuse of children in care in Scotland or where their care was arranged in Scotland.
The latest phase of the inquiry, heard before judge Lady Smith, is exploring reasons why calls between August 2002 and December 2014 for a public inquiry to be held were resisted by ministers.
James Peoples QC, senior counsel to the inquiry, said the current Constitution Secretary Mike Russell told him on Thursday that "influential figures, including Alex Salmond, Kenny MacAskill and the then Lord Advocate Frank Mulholland were not persuaded" of the need for an inquiry.
Mr Swinney agreed, saying: "There was a difference of views in Cabinet in the summer of 2014 if there should be an inquiry."
He told the inquiry that the BBC Scotland programme Sins of Our Fathers, which revealed allegations of child abuse at Fort Augustus Abbey when it was broadcast in 2013, had been a "seminal moment".
Mr Swinney said the Scottish government had taken a number of steps to help abuse survivors but the programme showed they were not doing enough.
Mr Peoples said Mr Russell had said the difference of views was "quite robust" and that there were concerns about the amount of time it would take and the cost involved.
Mr Swinney replied: "There was a perfectly respectable debate among Cabinet but there were two opinions.
"One argument was that the inquiry would not address the issues and would not deliver the outcomes survivors hoped for.
"Mike Russell had engaged heavily with survivors and his view was we had to confront this issue as a country, to do justice for survivors to enable them to have their experiences documented, understood and reflected on, and for the state to accept responsibility for what happened to them.
"I supported him in that view in Cabinet."
Mr Swinney said the inquiry was authorised in December after the change of first minister had taken place.
"Without a doubt, there was a division of views in Cabinet," he said.
Mr Swinney also said the cost of an inquiry would not have been a deterrent, saying: "I've seen a lot of traffic about money in the papers and I was finance minister for nine years, so I controlled that money.
"Ironically, in the period after 2007, the financial issues were a lot less than in early 2014."
He added: "When I came to office in 2007, I was pleasantly surprised there was £1.6bn in an account in the Treasury that hadn't been spent.
"When I was going through the accounts in 2006 and saw that, I thought that would be quite handy to have that. We still had the block grant and there was £1.6bn that had not been spent, which I found quite surprising."
'Hidden money tree'
Mr Peoples asked: "Although you weren't approached about finding money for an inquiry, there was money there?"
Mr Swinney said: "There was a hidden money tree at that point. So the idea that money was an issue - I had the ability to fund the financial priorities my colleagues found to be important."
In 2002 a former resident of a care home submitted a petition to the Scottish Parliament calling for an inquiry into the abuse of children who were in care and an apology.
In 2004, the then First Minister Jack McConnell said sorry on behalf of the people of Scotland but his Labour-led administration stopped short of ordering an inquiry.
Lord McConnell gave evidence about this last week, saying he had been worried that an inquiry would cut across legal action that was being taken by some of the survivors at the time.
The SNP took power in 2007, and Mr Swinney has been a government minister ever since.
Calls for an inquiry intensified after a BBC documentary was broadcast in 2013 which contained allegations that children were abused at the Fort Augustus Abbey School in the Highlands.
The inquiry continues.