When Omar's boss called him from abroad to tell him he wanted to come back Tripoli to restart his manufacturing business, the Libyan employee joked to his foreign manager the visit would just be personal.

I said 'Boss, you would be spending all your time with me, there is no one to do business with', Omar, who would only give his first name, said. I told him to wait.

Omar's boss, like many other international businessmen, is keen to return to Libya to get his venture back up and running after eight months of civil war ousted Muammar Gaddafi from 42 years in power.

But in a nation lacking security and bristling with weapons, their re-entry may not be swift or easy.

Within days, Prime Minister Abdurrahim El-Keib will name a new government that will have the tough task of asserting the National Transitional Council's (NTC) control of a fractured country, reviving the economy and introducing democracy.

It will have to build institutions from scratch, sustain the revival of Libya's oil industry and disarm militias.

It's a rather dark picture that is to be painted right now. Offices have been looted in the conflict, it's not clear who is in charge, who you need to speak with, said one European businessman who returned to Libya a few weeks ago after being evacuated during the conflict.

I have tried to go find my old clients to get money that was owed, but how can they pay me back? Services aren't back up and running, banks are still limited in their operations.

Post-war Libya is also grappling with a banknote shortage.

The businessman had visited his old office and home, but like many other foreigners in Libya now, preferred to stay in the secure compound of one of Tripoli's plush hotels.

There is no police, no order right now, he said. But I am hopeful things will get better.

Bringing unruly and heavily armed militias under government control is a daunting challenge. Many foreign workers are adopting a wait-and-see approach until stability is restored.

The economy is suffering from a lack of funds and the spread of weapons is one of the reasons for this with regard to tourism and foreign companies, Tripoli Islamist militia leader Abdel Hakim Belhadj told a seminar at Tripoli university.

At Tripoli Towers, one of the capital's main office blocks, the bulk of businesses operating are Libyan. The few foreign airlines that fly into Libya have re-opened their doors, but corridors are quiet.

At a nearby block of offices, the lack of foreigners is also evident. Outside a Libyan man carried his shopping in one hand and an AK-47 assault rifle in the other.

This place used to be buzzing, said a Western security adviser. Now the main thing you notice is the lack of expats.

Foreign faces can be seen in hotel lobbies but their visits are fleeting for now. There seem to be more security guys here than actual businessmen, a second security contractor joked.

Neither contractor expected a significant return of foreigners before the new year at the earliest. Moving their families back will take even longer, one said.

Jack Mullan, director of risk consultancy Morelia Investments, said clashes between rival militias had deterred foreign businesses from rushing back to Libya.

Last week, heavy fighting between local armed groups killed several people on the outskirts of Tripoli.

British airline bmi has cancelled plans to resume direct flights from London to Tripoli this month and said on Friday there was no firm date for restarting the service.

The poor security environment would have to improve before investors return. The current militia in-fighting would have to be resolved to soothe many investors' concerns. Otherwise many Fortune 500 companies will not return to Libya, said Mullan, who also cited an unpredictable regulatory environment.

HUGE OPPORTUNITIES

Yet with the civil war over and a government in the making, foreign executives are weighing the opportunities against the risks in an oil and gas-producing nation with the resources to pay for urgent reconstruction and healthcare needs.

Several Western nations have sent trade delegations, no big winners have emerged yet in the race for contracts.

The government has to be named, there needs to be structure before business can be done, a diplomatic source said.

Tarek Alwan, managing director of London-based consulting firm SOC Libya, said he had been approached by numerous companies seeking guidance on how to enter the Libyan market.

We have noticed a greater degree of demand to enter the Libyan market. There are huge opportunities in Libya in construction, infrastructure, IT, tourism, he said.

My advice is that it is still a bit too early to do business in Libya. My advice is that they should be doing their homework and preparations.

One company that was quick to make a move was Britain's Heritage Oil which spent $19.5 million (12.3 million pounds) buying a controlling stake in Benghazi-based Sahara Oil Services in October, in a deal that was denied by Libya's National Oil Company.

NTC officials have said existing contracts with foreign firms would be honoured, although those found to have been awarded corruptly might be reviewed.

But major new concessions are unlikely to be awarded until the incoming transitional government has given way to an elected administration, scheduled to take place in eight months.

In the meantime, restocking offices, finding new staff to replace foreigners who fled, and in some cases getting striking workers back to work is key. Workers at Libyan oil producer Waha Oil, which pumped around a quarter of pre-war output, downed tools for weeks until their demands for a new chairman were met.

Let's try to get things started, Libyan businessman Amr Azzabi said, And then make changes as we go along.

(Additional reporting by Oliver Holmes and Alastair Macdonald; Editing by Alistair Lyon)