US computer company Sun Microsystems has swung into the red as a result of the cost of thousands of job cuts.
Sun says efforts to turn around the business are bearing fruit
The group posted net losses of $301m (£163.5m) for the three months to 30 June, against a $50m profit in 2005.
The company is in the middle of a huge restructuring plan costing 5,000 jobs, as part of a bid to end five straight years of losses.
Excluding one-off costs, the group would have broken even as sales increased 15% to $1.81bn.
Elsewhere, revenues rose 29% $3.83bn from $2.97bn, topping analyst expectations of $3.6bn.
"We're making excellent progress returning Sun to growth and profitability," chief executive Jonathan Schwartz said.
"Revenue, bookings and backlog are all up substantially - indicating we're gaining traction, market confidence and share."
Sun had warned the shake up of the company would cost at least $500m in coming quarters when it launched the revamp in May.
In the latest results, restructuring costs came in at $288m.
By trimming 13% of its workforce, the group expects to yield annual cost savings of up to $590m.