(Fixes typo in name in paragraph 13)
By Kieran Guilbert
MAIDUGURI, Nigeria, Feb 7 (Thomson Reuters Foundation) - A lmost two years after Boko Haram militants attacked his hometown in northeast Nigeria, killed his neighbours and forced his family to flee to safety, Ibrahim Usman faces a dilemma.
Either he, his wife and five children stay in their makeshift shelter in Maiduguri, the capital of Borno state, and risk starvation, or they return home to a town reduced to rubble, and the threat of further violence from the jihadists.
"The situation for the displaced here is so desperate that some people will go back even if their village is not safe, even if there is a risk of being killed," he said, walking through a maze of flimsy huts packed together on a small plot of land.
Boko Haram's seven-year bid to create an Islamic state in northeast Nigeria has uprooted 1.8 million people - three in four of whom are residing in local communities, rather than in camps - says the International Organization for Migration.
This has fuelled tensions and piled pressure on services and infrastructure - from schools and clinics to toilets - in these stretched communities, leaving people increasingly dependent on dwindling aid in a region where food and shelter are scarce.
Amid the strain, more than 90 percent of the displaced are considering going home as Nigeria's army retakes control of more areas held by Boko Haram, said the U.N. refugee agency (UNHCR).
Aid agencies now face a double challenge: to think beyond traditional aid and find ways to help host communities cope with the ongoing pressure on their resources; and to assist the displaced planning to rebuild their lives back home.
The needs are huge on both fronts - from providing people with skills and jobs, to restarting agriculture and markets - in a region where long-term development and resilience-building efforts have been limited, aid experts told the Thomson Reuters Foundation.
"It is clear that humanitarian handouts will not solve problems for that many people," said Lucky Musonda, spokesman for the United Nations Development Programme.
"Resilience is kicking in now but it is just the beginning," Musonda added. "It helps preserve hope for the future... that people can have better lives than they did before the crisis."
Investment in services, infrastructure and economic growth has long been lacking in mostly Muslim northeast Nigeria, according to locals who say it has been excluded from decades of petro-dollars flowing into Africa's top oil producer.
While Boko Haram's bloody insurgency, starting in 2009, made things even worse, efforts to bounce back from the crisis by the state, donors and aid agencies are underway, albeit moving slowly, said Adrian Ouvry, a humanitarian adviser at Mercy Corps.
"There is a lack of knowledge about what building resilience actually means," said Ouvry, citing examples such as youth empowerment, climate-smart agriculture and restoring peace to communities fractured by the conflict. "Communities have mostly been left to manage as best they can by themselves."
Coordinating aid in the region has proved a major challenge for Nigeria, which has not faced such a humanitarian crisis since a 1967-70 civil war in which a million people died, and is grappling with its first recession in 25 years as oil prices fall.
Tensions have flared between the government and aid agencies over the scale of hunger in the northeast, which is suffering from a lack of funding from international donors, experts say.
The United Nations in December doubled its aid appeal for the northeast to $1 billion for 2017 in a bid to help some 7 million people. Last year's $484 million appeal has only been 53 percent funded, the U.N.'s Financial Tracking Service shows.
"Donors see Nigeria as a strong economy that should be able to feed its own people, while the government has been too proud at times to admit it needs aid," said one humanitarian worker in Maiduguri who asked not to be named due to the sensitivity of the issue.
Queuing for the one latrine shared by hundreds of displaced people, mother-of-six Hauwa Adam is tired of waiting - for the toilet, for healthcare, for water, but mainly, for food.
Surrounded by dozens of her neighbours who fled their village in Kala Balge together when Boko Haram struck in 2015, Adam complained of sporadic food aid deliveries.
"We never know when aid will arrive - we can't keep on living like this," said Adam, who has lived in a cramped hut on a private plot of land in Maiduguri for almost two years.
These small groups of displaced people living on state or private land are numerous across the city, yet their size means they are often neglected in aid distributions while they cannot access local services, said Francis Tabu, emergency programme co-ordinator for the International Medical Corps.
"If it's just 50 or 100 people, they often go under the radar and end up without support from the state, aid actors or local people," he said. "They're falling through the cracks."
But aid groups, including the Danish Refugee Council (DRC), are seeking to boost resilience in the area by investing in services and infrastructure that not only benefit the displaced in the short term, but also local communities in the long run.
Dialogue and planning are key to ensure projects, from wells and toilets to health clinics, meet the needs of local residents and landowners, and will continue to do so once the displaced return home, said DRC interim country director Christian Gad.
"When we take community needs and concerns into account, we can ease tensions and competition over meagre resources," he said.
Huddled around sewing machines in a crowded training centre in Maiduguri, dozens of uprooted women made dresses and caps, while a group of men outside were taught carpentry skills.
Fewer than one in five displaced households has any source of income, forcing many to spend their savings and sell assets, thus hindering their ability to recover in the future, said the U.N. Office for the Coordination of Humanitarian Affairs.
Teaching the displaced profitable skills helps them not only to feed their families, but also to fix the damage done by Boko Haram, said James Banjo, a livelihoods consultant for the UNHCR.
"The carpenters we train are helping the state government to repair damaged buildings in some areas," Banjo said.
"For those learning to make clothes, we provide entrepreneur training, help them to set up businesses and encourage them to teach others. The goal is to make people less dependent on aid."
Such opportunities may even dissuade some from returning home, which would increase the need to enable the areas where they settle to accommodate larger populations, said the World Bank and the London-based Overseas Development Institute (ODI).
"The biggest challenge is to create economic opportunities for the host communities as well as the displaced," said Sherine El Taraboulsi-McCarthy, a research fellow at the ODI. (Reporting by Kieran Guilbert, editing by Megan Rowling; Please credit the Thomson Reuters Foundation, the charitable arm of Thomson Reuters, that covers humanitarian news, women's rights, trafficking, property rights, climate change and resilience. Visit news.trust.org)