An investigation by the Office of Fair Trading (OFT) discovered that members of the RBS Professional Practices Coverage division passed on information to Barclays about the pricing of loans to large professional services companies.
The two banks are the main providers of such loans in the UK.
Barclays, which used the information to set its own prices, reported the matter to the OFT â giving the bank immunity from prosecution.
Ali Nikpay, senior director of cartels and criminal enforcement at the OFT, said: "Any company that discloses confidential future pricing information to its competitors risks a substantial penalty."
RBS was originally to be fined Â£33.6 million but this amount was reduced to reflect the fact that the bank admitted its guilt and agreed to co-operate with the regulator's investigation.
Last month, RBS announced a loss of Â£3.6 billion for 2009 â an improvement on the Â£24.3 billion deficit recorded for 2008.
By Asim Shah