PETROFAC, the oil services giant which employs around 4,000 people in Scotland, has returned to the black in the first half in spite of incurring another $100m loss on a troubled Shetland project.

The Jersey-incorporated company made $58m (£44m) pre-tax profit in the six months to June compared with a $183m loss last time. The company grew revenues around 20 per cent to $3.9bn from $3.2bn as it worked through orders won in prior years.

Petrofac helps oil and gas firms to build new facilities and to run existing assets.

The first half profit was stated after Petrofac booked a $101m charge in respect of the contract to build a terminal on Shetland to process gas from the giant Laggan Tormore development for Total.

Petrofac, which cut more than 100 jobs in Aberdeen in the first half, said the charge was principally in respect of damages agreed as part of the final commercial settlement with Total.

The terminal came on line in February, around 18 months behind the original schedule.

Petrofac incurred around £500m total losses on the project which it has said was dogged by low productivity and bad weather.

Chief executive Ayman Asfari has said Petrofac paid dearly for its lack of experience of running such a project in a wholly new geography.

The company said yesterday: “We are now fully demobilised from the Laggan-Tormore project site on Shetland and we have received the provisional acceptance certificate from our client, confirming completion of the project.”

Petrofac booked a $1m charge in respect of another challenging North Sea project in the first half.

The charge reflects factors such as commercial settlement adjustments in respect of the contract to help Ithaca Energy develop the Stella field east of Aberdeen.

Stella is due onstream in November around two years behind schedule. The hold up was caused by delays in work in Poland on the production vessel that will be used on the field. Petrofac has been managing work on the vessel and has a 20 per cent interest in Stella.

The problems with the North Sea projects compounded the challenges posed by the crude price slump.

Petrofac has been trying to cut costs and increase efficiency in response.

In January Petrofac announced it was axing 160 jobs. The bulk of the job losses are thought to have been in Aberdeen, where Petrofac wanted to simplify back office operations.

Petrofac appears to have shed 800 jobs in total in the first half. It had 18,200 employees at 30 June, including long term contractors, compared with 19,000 at 31 December.

Market conditions remain tough. Oil and gas firms have slashed investment in new projects amid fears that the crude price slump could run deeper and last longer than had been expected.

Mr Asfari said there have been few project awards in the company’s core markets in the year to date.

However, he said Petrofac has a strong order book and is bidding for a large number of projects.

“We are on track to meet expectations for the full year 2016 and our high level of backlog gives us excellent revenue visibility for 2017,” said Mr Asfari.

Petrofac won $500m new contracts and extensions in the North Sea in the first half, from firms such as BP and Total.

The company maintained the interim dividend at 22p per share.

Shares in Petrofac closed down 8p at 858.5p.