* China loan comes at crucial time for troubled Petrobras
* Loan is for $5 billion to $10 billion -source
* Payment can be in oil or cash at China's request -source
* Loan boosts China Bank's Brazil exposure, but amount unclear (Rewrites, adds source comment, loan detail, Petrobras debt background, tallies of China's Petrobras loans)
By Jeb Blount
RIO DE JANEIRO, Feb 26 (Reuters) - A Chinese loan of up to $10 billion to Brazil's Petrobras could pay nearly all its $12 billion in maturing obligations in 2016, easing pressure on the oil company as it struggles to fix its troubled finances by selling assets and slashing spending.
The credit line to Petroleo Brasileiro SA, as state-run Petrobras is formally known, is from China Development Bank and was announced on Friday. It is for $5 billion to $10 billion and can be repaid in cash or oil at China's request, a source involved in debt talks told Reuters.
Petrobras has about $130 billion in obligations, making it the world's most indebted oil producer and one of the world's most indebted non-financial companies.
"The loan increases China's commitment to Petrobras and will go a long way to pay the $12 billion coming due this year," said the source, who asked not to be identified because permission to speak publicly about the loan had not been granted.
A giant price-fixing, bribery and political kick-back scandal, which continues to generate arrests in Brazil and abroad, led to record Petrobras losses and write-downs in 2014. Its formerly investment-grade debt rating has been downgraded to "junk" status as a result, limiting access to capital markets and increasing finance costs.
The Brazilian oil company, hit as well by a plunge in oil prices, has been forced to sell assets and slash spending by about half, putting off investments in giant new offshore discoveries and helping fuel Brazil's worst economic downturn in more than a century.
Petrobras has long been Brazil's biggest company and largest investor, with its infrastructure investments surpassing those of the government until recently.
The terms from China Development Bank are similar to a 2009 deal in which Petrobras guaranteed the supply of up to 200,000 barrels of oil a day to China's state oil firm Sinopec for 10 years, Petrobras said.
The new loan comes at a time when Petrobras' debt and its difficulty in meeting a goal to sell $14 billion of assets this year has raised concern that it will have to make deeper cuts.
Further cuts are likely to boost unemployment and limit oil output needed to pay the company's future obligations. They also put at risk tens of billions of dollars in royalties the government is counting on to promote development and improve health care and education.
President Dilma Rousseff on Jan. 15 reversed long-standing government policy by saying she did not rule out injecting new capital into the embattled oil company, a move that would ease Petrobras' debt and investment problems but weaken the finances of a government whose debt has also been cut to junk status.
While the new loan is a substantial increase in Chinese commitment to Petrobras, the exact amount of the China Development Bank's exposure is not clear. China has agreed to lend Petrobras as much as $15 billion when the 10-year 2009 loan is included, the source said.
A Petrobras spokeswoman said the new loan raised China's commitment to $15 billion when $5 billion loaned by China Development Bank last year to a Petrobras subsidiary in the Netherlands was included.
Petrobras said in its statement on Friday that the new $10 billion loan contract was the result of a cooperation accord signed between Brazil and China in May. (Additional reporting by Marta Nogueira and Alonso Soto; Editing by Bernard Orr and Tom Hogue)