The British government has agreed to sell Northern Rock, the failed mortgage lender it nationalized in 2008, to Virgin Money, the banking arm of Richard Branson's Virgin empire.

The sale of Northern Rock to Virgin Money is an important first step in getting the British taxpayer out of the business of owning banks, Chancellor of the Exchequer George Osborne said in a statement on Thursday.

Under the terms of the deal the government will receive 747 million pounds ($1.2 billion) in cash on the closing of the sale, rising to as much as 1 billion pounds in total in the future.

Northern Rock, a former mutual that used cheap wholesale credit to grow aggressively in the British mortgage market, was nationalized in early 2008 after banks abruptly stopped lending to each other in the credit crisis.

(Reporting by Paul Hoskins; editing by Paul Hoskins)