Spanish authorities have arrested two elderly siblings who kept their mentally ill brother captive in inhumane conditions inside a roofless cubicle annexed to their home.

Police found the man lying completely naked on a filthy mattress, after breaking through two locked doors of a house in the southern town of Dos Hermanas, Andalusia.

It was not immediately clear for how long the 59-year-old had been confined inside the 3m sq hovel, with no running water or sanitation, but doctors said there was no medical record for him after 1996.

Police found him by luck, after responding to residents' calls that a man was behaving in a disorderly fashion in the area. They found a heavily-drunk 76-year-old who agreed to be brought back to the home he shared with his 61-year-old sister.

"Once inside the house, they found a door at the end of a corridor closed with chain and padlock," police said in a statement. "After questioning the man, he explained that his brother lived there, who suffered from mental issues and was being kept isolated for security reasons."

The sister added they had been looking after their younger brother and his €1,000-month (£738, $1,100) pension. The officers decided to go have a look for themselves.

After the first door was a second, shut with a wooden beam that opened onto a narrow staircase, which finally led to a sort of "pigeon loft" where the man was confined.

"His health and hygiene were miserable and the room was in completely unsanitary conditions, with bottles and buckets used for his basic needs and no running water or a toilet," police said. The man was taken to hospital, while his two siblings were arrested. They are facing a series of charges including ill treatment of a family member and unlawful detention.