The Financial Regulator was "uncomfortable" about a proposed agreement between Anglo Irish Bank and Seán Quinn's companies to unwind Mr Quinn's stake in the bank in March 2008, the Dublin Circuit Criminal Court has been told.
The comments came from Con Horan, who was the senior official from the Financial Regulator's office in charge of banking supervision.
He is giving evidence at the trial of the bank's former chairman, Seán FitzPatrick, and two former executives of the bank, Patrick Whelan and William McAteer.
The three men deny giving unlawful financial assistance to 16 people, including six members of Mr Quinn's family in July 2008, to buy shares in the bank.
Mr Whelan also denies being involved in fraudulently altering seven loan facility letters.
Mr Horan was the prudential director of the Irish Financial Services Regulatory Authority in 2008. He reported directly to the chief executive Patrick Neary.
He said that in February 2008, he was contacted by the auditors to the Quinn Group, Price Waterhouse Coopers, who were concerned about issues that had arisen in Quinn Insurance.
Mr Horan said the auditors told him the background to this was that the family had lost a lot of money on Contracts for Difference positions and this was why money had gone out of Quinn Insurance.
He said he became aware on Good Friday 2008 of the extent of Mr Quinn's stake in Anglo through the CFDs.
He said it was clearly a significant problem in the middle of a global financial crisis and said it was a very difficult position that they had found themselves in.
Mr Horan said it could have caused very severe problems for Anglo and possibly the broader financial system.
At the end of March 2008, he became aware of a proposed agreement between the bank and the Quinns to unwind the stake.
This agreement involved the family buying 14% of the shares and the other 14% being placed with institutional investors.
Mr Horan said he was aware the Quinns were going to borrow €460m from Anglo in relation to this deal - €100 million of which would go towards repaying Quinn Insurance.
He said he was "uncomfortable" with this as there were obviously liquidity problems with the Quinn Group and the regulator did not want to see the bank increasing its exposure to the group.
But he said in general, the regulator was positive towards the proposal and glad to see a solution was being found.
However, by mid April, he said he was told market conditions were too difficult to find investors to take a portion of the shares.
He also said he understood ten investors identified by Anglo Irish Bank to buy shares in the bank would be putting up the funds themselves.
On 9 July 2008, Mr Horan said he got a call from Anglo's then Chief Executive David Drumm to say it had been decided to place a portion of the shares with individual Irish and international investors identified by the bank.
Mr Horan said Anglo would have to put up the money for the deal on the day of the transaction.
But he understood most of these people would then be putting up the funds to buy the shares themselves and that Anglo would provide financing for a very short period if any of them had a short term cashflow problem.
'Non-standard elements' to Anglo transaction
Earlier, an executive from global investment bank Morgan Stanley told the trial that there were some "non-standard elements" to the transaction that is now the subject of criminal charges.
David Churton, an executive director in Morgan Stanley's legal and compliance division, gave evidence by video link from London about his involvement in the plan to unwind Mr Quinn's stake in the bank in July 2008.
Mr Churton said it was not unusual for the team in Morgan Stanley who were dealing with the transaction to be involved in "bespoke solutions" to potentially complex problems.
However, he said there were some "non-standard elements" to this transaction.
Mr Churton said these non-standard elements included the fact that part of the rationale for the transaction was that the Financial Regulator was encouraging it.
He said it would be unusual that the providers of the CFDs would be directed to sell the underlying shares and told who to sell them to.
Mr Churton said it was also a "non-standard" element that financing was to be provided to the purchasers of the Anglo shares.
He said this gave rise to some concerns around financial assistance.
Mr Churton also gave evidence about a call with Mr Horan on 12 July 2008, in advance of the transaction being executed.
He said he did not believe there was any discussion about the fact that the bank would be lending money to the ten customers of the bank to buy the bank's shares on this call.
Mr Churton said after the call, his understanding was that the Financial Regulator had effectively confirmed that he was encouraging the CFD interest to be unwound and that he wanted this carried out in the "near future".
He also said he understood the Irish regulator was not raising any red flags about the structure of the transaction.
Mr Churton said Morgan Stanley also made contact with the UK regulator.
He said the UK regulator viewed the Irish regulator as being the lead in relation to the transaction and said the Irish regulator had not raised any particular concerns.
He said Morgan Stanley was not looking for formal approval from the Irish regulator but wanted to make sure the regulator was given the opportunity to raise any concerns if he had any at that time.
Mr Churton agreed that he was aware on Friday 11 July that Anglo was lending money to the ten customers for the transaction.