When the man in charge of Libya’s main border crossing with Egypt checks his staff rota every morning, he can count on a maximum of just 30 officers.

The tiny force polices the northern tip of a 1,115 km desert border, where Egypt and its Western allies hope to prevent Islamist militants infiltrating to join fellow fighters on Egyptian territory, or sneaking back into the lawless OPEC producer to find safe haven.

But hampered by a lack of manpower and equipment, worsened by a breakdown in state authority following the 2011 downfall of Muammar Gaddafi, Libya’s border guards are struggling to contain the spreading anarchy.

On paper, the Libyan interior ministry force in charge of the Musaid crossing into Egypt has 120 men on the payroll, but only 30 or so show up regularly for work.“The rest go to the bank on the 30th (to pick up their salaries),” Musaid security chief Ibrahim al-Mumin said.

Neither of the north African neighbours has a firm grip at the border. Only two weeks ago, 15 members of the militant Islamic State group, which controls large parts of Syria and Iraq, crossed in from Egypt to set up a cell in Libya.

The two countries agreed on Wednesday to step up efforts against insurgents, with Cairo promising to train Libyan forces to battle the militants.

Since 2011, Libya has failed to build up state security forces and disarm former rebels who helped remove Gaddafi but now use their military muscle to battle for power.

The situation has worsened since an armed opposition group from the western city of Misurata seized the capital Tripoli in August, forcing senior officials and the elected parliament to retreat to the eastern city of Tobruk while the Misurata-led forces have set up an alternative government in the capital.

With rival entities claiming legitimacy, diluting command structures and forcing the central bank to block payments apart from salaries, many civil servants have stayed away from work.

The internationally recognised government, holed up in the east, has no authority to force people to go to work, but is unwilling to stop salaries, fearing further havoc.

Out of 120 men on payroll, only 30 show up regularly, the rest go to the bank to pick up salaries

As well as manpower, the Musaid force lacks equipment such as night-goggle vision, radios and computers to monitor smugglers shipping anything from weapons to subsidised food.

“We have only four cars, only two of them are in good shape,” said Mumin, pointing to a derelict communications tower outside his modest first floor office.

Up to 500 people a day, or between 100 and 150 vehicles, cross at the border post, a complex of rundown buildings with bullet holes in the walls from the 2011 uprising. One house is used as a garbage dump. Cars navigate pot-holed roads, avoiding Sudanese workers asleep on the ground as they wait for Egyptian visas.

Libyan passport officers carry out visa checks on laptops without a live connection to the interior ministry database. But even internet access would make little difference controlling the porous frontier, where people seem to cross as they please.

“Look, that’s where some people cross,” said an officer pointing to a fence marking the border between the two countries just behind the official crossing. “People smuggling guns don’t pass through the border station,” agreed Mumin.

Despite the cooperation deal between the two countries, Libyan border guards have little contact with counterparts across the frontier in the Egyptian town of Sallum.

Libya’s nascent army has camps along its eastern border, stretching from the Mediterranean coast to Sudan in the deep south, to support the understaffed interior ministry force. But some camps are empty or unable to mount patrols, officers at Musaid say. “They have the same problem with staff not reporting for work,” one said.

Musaid is a desolate town some 140 km east of Tobruk were the elected parliament has settled since the Misurata force seized the capital. Border officials deny Egyptian claims that militants are running camps on the Libyan side, saying strong tribal ties on both sides of the border act as natural deterrent.

Gaddafi neglected the east of the country for decades as a punishment for dissent during his 42-year rule, concentrating power and oil wealth in western and central Libya.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.