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 (700 mile) 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 Qaddafi, 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 neighbors has a firm grip at the border. Only two weeks ago, 15 members of the militant Islamic State of Iraq and Syria 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 Qaddafi but now use their military muscle to battle for power. The situation has worsened since an armed opposition group from the western city of Misrata seized the capital Tripoli in August, forcing senior officials and the elected parliament to retreat to the eastern city of Tobruk while the Misrata-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 recognized 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.
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 subsidized 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 their counterparts across the frontier in the Egyptian town of Sallum. Asked if there was any coordination with Egypt, Mumin said: "No."
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 made up of white buildings, some 140 km east of Tobruk were the elected parliament has settled since the Misrata force seized the capital.
On the dusty main road littered with plastic bags, cheap restaurants serve meat rolls to Egyptian truckers. Sheep graze among discarded cartons and juice cans.
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.
"We are all from the same tribe and know each other. No militant can live here. We don't have a security problem," said Farhan Ibrahim, the town mayor. But he said a lack of jobs forced some people into cross-border smuggling.
"The biggest problem here is a lack of development. Young people don't find jobs," he said, sitting in his office in the Camel Hotel, the town's only lodging. "We want universities, foreign universities to open branches here, firms to come."
Qaddafi 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. The main eastern cities Benghazi, Tobruk and Bayda suffer from ageing schools and hospitals as well as dilapidated roads.
There is just one state-of-the-art development project in Musaid -- a new border post built by Qaddafi before the 2011 uprising stretching almost a kilometer.
The yellow complex has a helicopter launchpad, a health center to detect contagious diseases, passport offices and staff accommodation buildings. There's even a green flag painted on two buildings from the Qaddafi era poorly overwritten with the new Libyan flag.
But the complex is still closed. "We hope to open the new border station soon," said Mumin.