text: A tentative deal is believed to have been reached in talks with senior US Justice Department officials.
  The fine relates to the sale of securities based on home loans, which led to the near-collapse of the banking system in 2007.
  If confirmed, it would be the biggest settlement ever paid by an US company.
  Last month, JP Morgan was fined almost $1bn in the "London Whale" scandal, which arose from huge disastrous bets on the financial markets placed by former bank employee Bruno Iksil.
  The tentative deal to pay the $13bn fine to the Justice Department was reached during the talks on Friday, between JP Morgan lawyers with US Attorney General Eric Holder and his deputy Tony West, the Wall Street Journal said, citing officials familiar with the decision.
  The New York Times also reported that the investment bank was nearing the agreement. Neither the Justice Department nor the bank was available for comment.
  But the reports said that while the fine would settle all civil claims, the US bank would still face possible federal criminal charges being pursued in California or individual criminal claims.
  The $13bn sum is said to include $9bn in fines and a further $4bn in relief for struggling homeowners.
  In the run-up to the financial crisis, sophisticated financial products known as mortgage-backed securities were created by many investment banks.
  These special bonds contained a mix of investments but at their heart were supposed to be risk-free home loans, the BBC's business correspondent Joe Lynam reports.
  When the housing bubble burst, the value of these assets fell sharply and the credit markets seized up. The balance sheets of many US and European banks, including those in the UK, became toxic and they had to be bailed out by their governments.
  What JP Morgan is alleged to have done was sell the mortgage-backed assets knowing full well that many of the home loans were in fact very risky.
  Some of the problems relate to mortgage bank Washington Mutual and investment bank Bear Stearns, two failing firms that JPMorgan took over in 2008.
  The mortgage-backed assets played a central role in the near collapse of the banking system when banks realised in 2007 that many of their assets were worth a fraction of their official book value.
  JP Morgan had initially aimed to persuade Justice Department officials to drop the criminal investigation but the attorney general ruled that out, reports said.
  The bank is not alone in facing inquiries into past practice. In August, US government officials filed two lawsuits against Bank of America relating to mortgage-backed securities. Bank of America denied civil fraud in failing to disclose risks and misleading investors.
  JP Morgan has found itself overwhelmed by mounting legal troubles lately.
  Once the darling of Washington and Wall Street, it reported a rare quarterly earnings loss last week, mostly due to legal costs totalling $9.2bn.
  The bank lost $380m during the quarter, compared with a profit of $5.7bn in the same period last year.
  JP Morgan says it has set aside a fund of $23bn to deal with mounting legal costs.
target: US banking giant JP Morgan is set for a record $13bn (£8bn) fine to settle investigations into its mortgage-backed securities, US media reports have said.