* Lloyds out of APS, sets record 13.5 bln sterling rights issue
* RBS "thrown to the wolves" through forced asset sales
* Banks to sell 10 percent of UK retail banking, 1,000 branches
* Deal includes cap on cash bonuses for 2009
* RBS shares down 7 percent, Lloyds up 2.7 percent (Updates with details throughout)
By Clara Ferreira-Marques and Steve Slater
LONDON, Nov 3 (Reuters) - Britain's two largest retail banks secured another 31 billion pounds ($50.5 billion) from the government on Tuesday and agreed to sell branches and key businesses to appease EU competition concerns over state aid.
Royal Bank of Scotland and Lloyds Banking Group also accepted drastic caps on bankers' bonuses in deals that pave the way for Britain to begin selling the bank stakes it bought during the crisis -- a crucial source of funds as the country struggles with a ballooning budget deficit.
Lloyds also freed itself from a government insurance scheme for bad debts by raising 13.5 billion pounds ($22.1 billion) in the world's largest ever rights issue, as part of a 21 billion-pound capital raising.
That left RBS, already Britain's whipping boy in the banking crisis blame game, as the only bank taking up the government's Asset Protection Scheme (APS) and accepting the most punitive disposals. Its shares closed 7 percent down.
The deals were aimed at satisfying EU regulators that at least one of the UK banks has been severely punished, while also addressing bonuses and reducing the burden on taxpayers, said Simon Maughan, analyst at MF Global.
"All three boxes have been ticked. But rather than spread the pain evenly, the decision has been made to cut Lloyds some slack and throw RBS to the wolves," Maughan said.
RBS did, however, manage to secure more flexible APS terms than expected earlier this year, and said it would be able to leave the scheme within four years.
BRUISED RBS
Both banks were forced to make disposals to meet EU state aid rules. RBS was particularly hit, selling chunks of its retail bank under the revived brand Williams & Glyn's, its RBS Insurance arm and shrinking its investment bank.
"We do feel bruised by what we've had to go through," RBS's chief executive Stephen Hester said on a conference call.
"Our job (of turning around RBS) has been made more difficult by some of the aspects of the EU settlement, but nevertheless we believe it is a do-able job."
Shares in RBS, one of the top recipients of bailout funds globally, closed down 7 percent at 35.9p, well below the average price of 50.5p paid by the government for its stake.
Shares in Lloyds, which was backed by the state when it rescued battered rival HBOS at the height of the credit crunch, rose 2.7 percent to 87.4p, below the state's entry price of 122.6p.
PUNITIVE ASSET SALES
The UK government, which will inject 25.5 billion pounds into RBS and pay Lloyds a net 5.7 billion pounds to take up its rights in the cash call, said the disposals would shake up competition in retail banking, bringing "at least three new banks" to Britain's high streets over the next four years.
Lloyds and RBS will between them have to sell off businesses representing almost 10 percent of the UK retail banking market. Only new entrants or "small players" in the market will be allowed to bid, raising doubts about which buyers will step up.
Lloyds, which has avoided harsher penalties by staying out of the APS, said it would sell 600 of its retail branches, with disposals including Lloyds TSB Scotland, Cheltenham & Gloucester branches and its Intelligent Finance and the TSB brand.
To address EU concerns, it will face a dividend ban for two years and a prohibition on acquisitions for up to four years.
RBS will be forced to sell NatWest branches in Scotland and RBS-branded branches in England and Wales.
It will also have to sell Britain's largest car insurer, card payment business Global Merchant Services, sell its interest in RBS Sempra Commodities and shrink its investment bank, including capping its global debt league ranking to outside the top five.
RBS, in which the government's stake will rise to 84 percent from 70 percent, said it expected buyer interest for the assets and was considering an initial public offering for RBS Insurance, which it has put on the block before.
Both banks will have up to five years to make the sales.
LLOYDS DEAL
To sidestep the APS, Lloyds confirmed market expectations it would raise 21 billion pounds via a discounted rights issue and by swapping 7.5 billion pounds in existing debt into contingent capital, which will support its capital requirements.
The move will allow Lloyds to avoid the fees associated with the costly APS scheme as the economy improves, and will cap the government's stake at 43 percent. However, Lloyds said it will pay the government a 2.5 billion pound break fee to avoid the APS.
The fully underwritten 13.5 billion-pound cash call, which will involve a massive operation to inform Lloyds's 2.8 million small shareholders, will be priced on Nov 24 at the higher of either 15p or a 38-42 percent discount to the ex-rights price.
Lloyds said it had received backing from shareholders and bond investors, but the response on Tuesday was mixed.
"This deal does not look especially attractive ... They can't pay a dividend until 2012 at least and we still have all the secondary issuance to come," one top ten investor said. "I find myself very underwhelmed."
But another top 10 investor added: "The issue will go through successfully. The deal is done effectively."
PAY-AS-YOU-GO INSURANCE
RBS said its participation in the APS would be under better terms, confirming an expected "pay-as-you-go" arrangement that will allow it to pay annually, rather than via a single upfront 6.5 billion pounds, making it easier for the bank to exit it altogether within four years, subject to a fee.
It will now pay 700 million pounds a year for the first three years and 500 million pounds a year thereafter. Under the deal the extent of losses borne by the bank will rise to the first 60 billion pounds from 42 billion pounds previously, making it highly unlikely the bank will dip into the APS fund.
RBS will also get a contingent capital commitment from the government of 8 billion pounds.
In return for state help, banks also agreed not to pay cash bonuses in relation to 2009 performance to staff earning above 39,000 pounds while executive members of both boards agreed to defer all bonuses for this year until 2012.
RBS said the caps would make its task of recruiting and retaining staff even tougher as it overhauls the bank.
The two banks will also be forced to stick to their commitments to lend business and homeowners 39 billion pounds.
On Lloyds, UBS and Merrill Lynch were joint advisers. Morgan Stanley and UBS were joint advisers for RBS. Credit Suisse and Deutsche Bank advised the Treasury. ($1=.6115 pounds) (Additional reporting by Paul Hoskins, Myles Neligan, Raji Menon; Editing by Greg Mahlich)