Image copyright Getty Images Image caption More than £400bn per year is sent home by migrant workers

Migrants working abroad and sending back money is one of the biggest and often most overlooked forms of financial aid to poorer countries - often greater than formal overseas aid.

The Pew Research group has estimated an annual flow $574bn (£413bn) of such remittances being sent back from migrant workers to their families.

Among the biggest recipients - behind countries such as Mexico, the Philippines and Nigeria - is the central American country of El Salvador.

Broken backboards could have meant the end of the basketball season at the National Institute of General Francisco Menendez, a high school in El Salvador,

Image copyright Getty Images Image caption The local economies in El Salvador's cities are supplemented by money sent back from the US

The school, known by its Spanish acronym Inframen, simply didn't have enough money to fix them.

So the association of former students of the school, mainly living in the US, purchased the new backboards.

These ongoing donations are fuelled by the nostalgia and higher purchasing power of Salvadorans who have migrated, the majority now in the US.

Image caption Schools in El Salvador can rely on support sent back by migrant families working overseas

"When we were students, we were able to accomplish more because the teachers supported us.

"Personally, I feel like this is the best way I can give back what the teachers gave to me," said Roberto Pilianni, a 56-year-old Inframen alumni who has lived near San Francisco for 32 years.

"Plus, I'm a Salvadoran at heart who misses my country day after day."

Migrant dollar

More than two million Salvadorans live outside the country, but they continue to keep close ties to their place of birth, sending back more than $4bn (£2.9bn) last year.

El Salvador's economy relies heavily on these remittances, which made up 18% of the country's gross domestic product (GDP) in 2017.

These remittances can have a positive impact on education in the country.

Image caption Schools in El Salvador have links with former pupils now living abroad

But there are concerns that the relationship could be more fragile as the Trump administration implements policies that threaten Salvadoran migrants in the US, even those with legal, but not citizen, status.

In September 2019, an estimated 200,000 Salvadorans will lose an immigration status known as temporary protected status (TPS) that has allowed them to work legally in the US since a deadly earthquake hit the country in 2001.

An estimated 20% of remittances to El Salvador come from TPS holders, according to the bond credit rating agency Moody's.

Interior deportations, meaning deportations of people outside border regions who have typically been in the US for years, have increased by 34% under the Trump administration.

Now, immigration activists in El Salvador are reporting that the political climate in the US is driving some Salvadorans to organise their own return.

Morale as well as money

School budgets are already under pressure and the loss of migrant money would mean another financial worry.

"The economic support that our brothers and sisters outside the country give us is huge, just as much in regards to morale as in the economic aspect," said Manuel Hugo Canjura, the director of Inframen.

The group of former students often step in, paying for new uniforms, volleyball nets or basketball hoops or providing small scholarships.

Image caption Former students of Inframen have become important to funding the school

"Considering that Inframen is a school where many students come from low economic backgrounds where there aren't many options for a young student who wants to move forward, I want to give them support and convey the idea that a better future does exist and it can be achieved through education," said Mr Pilianni, who left the school in the 1980s.

His family no longer lives in El Salvador, so he gives back through his support for the school.

El Salvador is one of the most violent countries in the world outside a war zone, with just under 4,000 homicides last year in the small Central American nation the size of Slovenia.

Tackling gang culture

Youth are at high risk of joining gangs in El Salvador, a country of 6.5 million people with 60,000 gang members.

The site of the school is not an epicentre for gang conflict, but students commute from all over the city. Some live in gang-controlled neighbourhoods and staff suspect some students are involved in gangs.

Image copyright Getty Images Image caption Change in immigration in the US could have a knock-on effect for poorer neighbours

After-school projects can help to reduce criminal activity and drug use.

"When we give them a sport to play, we teach values that they can follow," said basketball coach James Douglas Napoleon.

"This is what I try to instil in them - that they have to study and behave well and all the other values that are so important, especially in this era."

The coach believes that two of the players on the boy's basketball team last year were involved in gangs. He hopes that teaching the students about the game can have a positive impact on them.

Image copyright Getty Images Image caption El Salvador is one of the biggest recipients of money sent back by migrant workers

"I feel like playing a sport gets rid of all your stress. It also helps us to know ourselves better," said Esmeralda Antillon, a 16-year-old student on the basketball team.

Knocking on doors

Paying for after-school programming is a government responsibility, but the director reports that last year he didn't receive all of the allocated budget.

The association of former students is aware of this reality.

"Yes, this should be the role of the state, but since the state doesn't provide what is necessary, that is where the association looks for an alternative, knocks on doors, and asks for partnerships," said Marvin Velasquez, one of the few members of the past students' association who still lives in El Salvador.

"The help from abroad is huge," said Mr Canjura, the school director. "If it ended, the truth is, I don't know what we would do."

More from Global education

The editor of Global education is sean.coughlan@bbc.co.uk