UPDATE 1-Petrobras to raise wholesale diesel fuel price by 5 pct
* Petrobras lost about $11 bln in 2012 on fuel subsidies
* Diesel was 14 pct below world price before hike - JPMorgan
* Vale is main diesel client; Cosan, Shell top distributors (Adds details throughout, background, share price)
RIO DE JANEIRO, March 5 (Reuters) - Brazil's state-led oil company Petrobras said on Tuesday that it would raise the wholesale price of diesel fuel 5 percent effective at midnight (0300 GMT) in an action aimed at cutting losses from selling fuel at prices below world-market levels.
The increase would apply to all diesel fuel sold to distributors at the refinery gate and would be applied to the price before taxes. Distributors are free to pass on the increase to their customers or not.
Diesel is Brazil's most-used motor fuel, powering most of the country's trucks, railway locomotives and heavy machinery. Mining company Vale SA is Brazil's largest diesel consumer.
Petroleo Brasileiro SA, as the company is formally known, has been forced by the government, its controlling shareholder, to keep fuel prices at home below international levels in an effort to control inflation.
Losses on fuel subsidies have crimped cash for investment as the company moves ahead with a $237 billion five-year investment plan, the world's largest corporate spending program.
The government said on Friday that it could erase the fuel price gap in 2013 to help Petrobras fund a massive expansion of offshore oil production.
Despite two increases in 2012, Petrobras recorded its first loss in 13 years in the second quarter and the refining unit of the company, Brazil's only refiner, racked up 22.9 billion reais (US$11.7 billion) of losses in the year.
After a third increase on Jan. 30, Petrobras diesel prices were still about 14 percent below world levels, according to JPMorgan Chase & Co. Gasoline prices, which will not rise at midnight, are about 11 percent below world levels, JPMorgan Chase said.
Rising demand at home and refineries working at near full capacity forced Petrobras to import fuel at world prices and sell it at home at a loss.
Imports also got a boost after a surge in ethanol prices forced the government to cut the amount of the biofuel in gasoline blends to 20 percent from 25 percent.
Principal distributors include Petrobras' distribution unit BR Distribuidora, the Ipiranga chain of gas stations and the local unit of Royal Dutch Shell Plc., which operates fuel distribution activities with Brazil's Cosan SA, the world's largest sugar and ethanol company.
($1 = 1.9635 Brazilian reais) (Reporting by Jeb Blount; Editing by Gary Hill)