Smuggling people into the country thousands want to leave
The accidental shooting of eight Mexican tourists during a security operation in Egypt's Western Desert underlines the difficulty of preventing militants crossing over from lawless Libya. But people are also going in the other direction - penniless Egyptian migrants looking for work in Libya - and the smugglers who take them say they too risk being shot on sight.
Typical aerial images of Egypt are dominated by two contrasting colours: the green trail of the River Nile that snakes vertically from south to north and the vast swathes of yellow desert that make up more than 90% of the country's surface.
At first glance the green seems confined to the river banks and triangular Nile Delta but on closer inspection tiny flecks appear in Egypt's Western Desert forming a series of stepping stones across the Sahara - "islands of the blessed" as they were called in ancient times.
The furthest of these oases, Siwa, is some 640km (400 miles) from the Nile and 320km south of the Mediterranean Sea, surrounded by thousands of square kilometres of desert.
Used by trading caravans for centuries, Siwa is accustomed to people passing through. Merchants, pilgrims and armies have all taken advantage of its fresh water supply, exquisite fruits and the shade of thick palm groves as they traverse one of Africa's harshest environments. The most famous visitor was Alexander the Great who came to the oasis in the 4th Century BC to consult the Oracle of Amun.
But a new type of visitor began to be seen more frequently after the political upheavals in Libya in 2011. The turmoil made it harder to cross the border at Sallum, on the Mediterranean coast, so Siwa - just 60km (40 miles) from the frontier - became the last stop for Egyptians leaving their homes in search of better-paid work, in Libya's oil industry for example.
Despite government warnings about instability in Libya, and a rising death toll of Egyptian nationals there, many are still keen to make the journey - which is a damning indictment of living conditions in many parts of rural Egypt. At the end of 2013, two years after Muammar Gaddafi's death, it was estimated that there were still between 700,000 and 1.5 million Egyptian workers in Libya.
Those that make the long journey overland to Siwa may well end up in a vehicle driven by Mohamed, a 44-year-old Siwan who has been involved in smuggling for most of his adult life, learning to navigate the desert routes from his grandfather who would regularly cross into Libya to fetch tea, sugar and other provisions from the nearest Libyan town, Jaghbub.
"What happened in Libya, it opened good business in Siwa," Mohamed says, sitting cross-legged on a green straw mat, and brewing endless cups of sickly sweet tea on a gas stove.
"In Siwa we have been living really comfortably - not like other parts of Egypt where people fight for business and there is no work, where there is nothing."
Much of the money has come from trafficking goods from Libya to Egypt - European cigarettes, hashish, pharmaceuticals and guns. Guns are now so cheap that every household has one, Mohamed says.
But the migrant workers have also provided a useful income stream. "They cannot go by Sallum, they need visas, they need paperwork, registration and money to bribe - so it is easier to go this way, the secret way," he says.
It is not a long journey - the closest drop-off point is only 90km (55 miles) away - but it has become a very dangerous one.
Since Abdul Fattah al-Sisi was appointed president in 2014 there has been a harsh crackdown on border traffic. The threat of militants crossing into the country, and the worrying flood of weapons arriving from Libya have led the armed forces to adopt an uncompromising approach.
Many vehicles spotted in the desert have been destroyed by army patrols, suspect smugglers have been rounded up and imprisoned, houses raided and numerous cars impounded.
"When the government started to close the way and start to shoot people, many died," Mohamed says.
"When the driver doesn't stop the car he [the soldier] shoots for the head - no questions. Now they see you in the desert and they shoot you straight away, even if you have no gun.
"It's like the government is killing animals, not people."
In February, Islamic state released an appalling video showing the murder of 21 Egyptian Coptic Christians in Libya.
This may have deterred some from making the crossing, but the urge to escape a life of crushing poverty prompts people to take risks.
According to the World Bank, Upper Egypt - that green band of territory from a point to the south of Cairo down to the Sudanese border - is home to 40% of the country's population, but accounts for 60% of those living in poverty and 80% of those living in severe poverty. A third of the population is under 30, and about half of these young people are unemployed.
Libya has been a destination for Egypt's migrant workers since the oil boom of the 1970s, and is likely to remain so until living standards improve - despite the increasing dangers of the journey.
Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.