Casas a la malicia, also called casas de difícil/incómoda partición (malice houses (English)) were a form of construction unique to Madrid in the modern age, from the sixteenth to the eighteenth centuries. This construction style involved one of various techniques used by locals to avoid housing officials of the court in their homes, as required under the Regalía de aposento.
Casas a la malicia Wikipedia
Casas a malicia resulted from the Regalía de aposento that was instituted when Philip II transferred the Court to Madrid in 1561. Along with kings came an endless list of nobles, officials of various ranks, representatives of religious orders and other characters. As there was not room to house everyone, it was decreed that the second floor of houses be allocated to accommodating the entourage. The regalía de aposento became the duty of every citizen, without exemption.
This royalty required that each citizen accommodate an official of the king in half of their dwelling area. Faced with this invasion of privacy and in order to avoid fulfilling that obligation, the locals found all kinds of ingenious construction solutions to avoid putting strangers into their homes. Some devoted most of the house to blocks, losing habitability. The new constructions appeared in their facades to be a single floor when they were actually two. The highest rooms were hidden from street view, which could be accessed from inside the building. Another strategy was building only one floor or excessively compartmentalizing each floor.
Locals still had to pay a monetary royalty, the collection of which was very complex. Due to their inability to host the royal officials, homeowners had to contribute royalties to the value of the third part of the rents that their property could produce, according to the legal provisions of Philip II which attempted to solve the Visita General (General Visitation) of 1749, still visible on the tiles attached to the facades of the houses in the historic center of Madrid. This act also led to a Planimetry and a very detailed Cadastre (see Regalía de aposento).