In Madrid airport’s bustling fourth terminal, Edu’s trolley is loaded with suitcases, but he won’t be checking them in. Unlike the thousands of Christmas travellers, he is not flying anywhere. For him the terminal is his destination – the closest thing he has to a home.

Nearly two years ago, the 49-year-old unemployed builder wandered into the airport while trying to hike up the road to another town.

“I came in here because I needed to sleep. And here I stayed,” Edu, who would not give his surname, said.

He is one of dozens who have made their home in the terminal, with its bright lights and huge glass windows overlooking the passenger planes on the runway.

Like other hubs such as Heathrow and Paris Charles de Gaulle, the airport’s warmth, security and free bathrooms, open round the clock, draw homeless people, who can blend into the crowds of travellers.

Adolfo Suárez Madrid-Barajas airport – Europe’s fifth-busiest, with 40 million passengers a year – is a public space, so authorities let the homeless sleep there as long as they cause no trouble.

Police say there are at least 30 people sleeping permanently in terminal 4, but the number goes up in the winter. Two days before Christmas, officers said they counted 42.

Poverty grew in Spain after a construction crash in 2008 left millions out of work. The recession is now officially over, but the unemployment rate is still close to 24%.

The latest official statistics count 23,000 homeless people in the country, but charities estimate the real figure is closer to 40,000.

Having spent more than half his life in jail for a series of armed robberies, Ginés Rubio, 52, ended up in the street after being released two years ago, separated from his wife and two sons.

In the airport he can get up to €15 a day by begging. He eats at a soup kitchen in the suburbs in the day and comes back to the terminal in the evening.

Like most of the airport’s residents, he chose the biggest and brightest terminal, with plenty of floor space and quiet corners to curl up in.

“People come to sleep in terminal 4 because it is the best,” said Rubio, a Madrid native with sunken features and a greying beard.

“I am less cold here. There are bathrooms where you can wash your hair.”

Sleeping on the floor without a blanket, he gets a few hours’ sleep before the early crowds arrive for the morning flights to London, Paris, the US and Latin America.

“I’d like to rob half a million euros and get out of here. But I don’t resent the other people I see here leaving. They have earned it.”

A miniature community has sprung up among the terminal’s residents, virtually all of them men.

Edu charges a euro a bag to keep an eye on the others’ belongings. Some earn tips by pushing passengers’ luggage on trolleys and helping them find the right check-in desk.

Among them is Valentin Giorgiev, a 60-year-old former school sports teacher from Bulgaria.

Long separated from his wife and two children, he came to Spain a decade ago and worked at odd jobs until four years ago, when he was diagnosed with cirrhosis of the liver.

Pushing his trolley around or drinking Coca-Cola in the cafes, taking his medicine and washing in the airport toilets, he blends in with the crowds of passengers who scarcely notice him until he offers to carry their bags.

At Christmas time he can earn up to €20 a day.

His whole body aches from sleeping on the floor. “But this is the only place where you can earn a bit of money,” he said.

“You see a lot of people in the street begging, but I would never do that.”

He has friends in the terminal, most of them fellow Bulgarians. But there are also unseen adversaries, he says.

“I have had lots of my clothes stolen. I feel bad,” he says. “I have nothing.”