You come back from the market on a Tuesday and the boiler man is already inside, because the owner let himself in with his copy of the key. Or the messages start: three buyers want to see the flat this week, can you be out at six. Both stories are common in Barcelona, and both start from the same wrong assumption, that owning the walls means owning the doorway. It does not. While you live there, the flat is your home, and the law treats it as one.
Article 18 of the Constitution makes the home inviolable. Nobody enters without the consent of the person who lives there, or a court order, or in the case of a flagrant crime. That protection is attached to the person occupying the space, not to the title deed, which is why a landlord with a mortgage, an IBI receipt and a key still cannot open the door on a Wednesday morning to check the pipes. Doing so can be prosecuted as allanamiento de morada under article 202 of the Penal Code. It is not a civil quarrel about a contract. It is a criminal offence, and the fact that he owns the property is not a defence.
The lease does give the owner one narrow right, and it is written in article 21: he can carry out necessary repairs to keep the dwelling habitable, and you have to allow the state of the property to be verified and those repairs to be done. That is the whole permission. It is not a general licence to inspect, to show the flat to a friend, or to turn up and look around because he is in the area.
In practice that means a date and an hour you have agreed, and a reason that fits the article. A leaking pipe under the kitchen sink qualifies. A vague wish to confirm that you have not repainted the living room does not. If you block a repair that is genuinely necessary and the delay causes damage, the owner can argue that you are liable for the extra cost, so a blanket refusal is a poor strategy. Refusing the third unscheduled visit of the month is not.
Plenty of Spanish contracts carry a line about periodic inspection, usually inherited from a template nobody read. A clause can regulate how visits are arranged, how much notice is reasonable and who may accompany the technician. What it cannot do is convert your home into a space the owner enters at will, because the inviolability of the domicile is not a disposable contract term. A court may look at the clause when deciding whether a particular visit was abusive. It will not read it as a master key.
This is where the pressure usually appears. The owner decides to sell, the agency calls, and suddenly there are photographers on Saturday and viewers at eight in the evening. There is no article in the LAU that hands a seller the right to parade strangers through a rented flat. Visits need your agreement, and so do photographs, especially ones that show your furniture, your books and the inside of your bedroom.
You also have a right that most tenants forget in the middle of the noise. If the owner sells to a third party, article 25 of the LAU gives you tanteo and retracto: you can match the price and buy the flat, and you must be notified in writing with the price and the conditions. The window is thirty days from that notification. If the sale goes ahead without it, the retracto can still be exercised, and a buyer who ignored the tenant's right has bought a problem.
The spare key is the quiet part of the story. Ask at the signing how many copies exist and who holds them, and write the answer into the inventory. If you want your own cylinder, you can normally change it, since the door of the dwelling is a private element rather than a common one, and keep the original to put back when you leave. Check the contract first: a clause that forbids it is not automatically void, and the clean move is a two-line email saying what you are doing and why.
Cameras are a hard no. A camera inside the flat, even a cheap wifi one aimed at the entrance, is treating a home as a monitored space, and the data protection rules do not become friendlier because the owner paid for the lens. A doorbell camera in the communal hallway is a question for the community, not for the landlord alone. If you find one that was not disclosed, photograph it, note the date, and ask in writing what it records and where the footage goes.
Put the rule in writing once, politely, and then follow it. Visits by agreement, at least 24 hours ahead for routine repairs and 48 for anything that involves a third party, inside a window you name, never before nine in the morning or after eight at night. The owner or the agency confirms who is coming. The technician carries a work order. You are not asked to leave the flat, and you are not asked to tidy it as if it were a viewing.
Urgency is the exception, and it is narrow. A burst pipe, a gas smell, smoke, water coming through the ceiling from the flat above, a fire alarm. There the door can be opened and the damage stopped, and the conversation about who pays happens afterwards. A dripping tap that has been dripping since March is not urgency, however often the email repeats the word.
If he walks in anyway, do not turn it into a shouting match in the hallway. Note the date and time, photograph the door and the person if it is safe, keep the messages, and send a burofax, which costs roughly twenty to thirty euros and leaves a certified trail that email does not. Then the police, with the evidence. Withholding rent is the move that feels fair and costs you the case, because non-payment is a separate breach and the judge will treat it as one.
We read the access clause, the inventory and the sale paragraph before you sign, and we tell you which lines will matter in month eight. It takes less time than the argument later.