A crack hidden under fresh paint, a leak that only shows up with the first autumn rain, a burst pipe buried underground: in Marrakech, where a good share of the older housing stock regularly changes hands, these defects discovered after signing are common. Since August 22, 2024, Moroccan law has changed on one point that directly concerns buyers: the deadline to take action against the seller went from 365 days to a window of two to five years. Here’s what that actually changes, and how to protect yourself before you sign.
Hidden defect or visible defect: the distinction that decides everything
Morocco’s Code of Obligations and Contracts (DOC) doesn’t protect buyers against just any flaw. Article 572 explicitly rules out the warranty for apparent defects — ones a normal, attentive viewing would have revealed. Only a genuinely hidden defect opens a right to recourse.
For the legal warranty to apply, Article 549 of the DOC sets three cumulative conditions — if even one is missing, the claim fails:
- severity: the defect must significantly reduce the property’s use or value (a leak that makes a room unlivable counts; a purely cosmetic flaw doesn’t)
- pre-existence: the defect must have existed before the sale, even if it only appeared afterward
- hidden nature: it must not have been detectable during a normal viewing — seasonal dampness invisible in summer, a crack masked by a fresh coat of paint
Examples cited by industry experts give a concrete sense of what these defects cover: leaking pipes, damp stains, water infiltration from faulty terrace waterproofing, structural cracks in load-bearing walls or columns, and peeling coatings.
What changed in 2024: a significantly longer deadline
Before the reform, Article 573 of the DOC required buyers to act within 365 days of the property’s delivery, on pain of forfeiture. Law No. 40-24, enacted by dahir No. 1.24.38 and published in Official Bulletin No. 7328 of August 22, 2024, amended that article: for real estate, buyers now have two years from the date the property is delivered and, in any case, five years from the date the sale contract is signed. The two limits stack: the second closes the action for good, even if the defect surfaces late.
“These provisions, in my view, favorably serve the protection of the buyer’s interests,” says Meriem Benis, a law professor at Hassan II University in Casablanca, interviewed by Médias24 on the scope of the reform.
This new two-year window aligns ordinary law with what Article 65 of consumer-protection law 31-08 already provided for sales involving a professional seller. In practice, the two-year clock often starts running when a survey report is filed, since that’s frequently the document that formally reveals the defect to the buyer.
Two possible remedies: price reduction or cancellation of the sale
Once the defect is established and the deadlines are met, buyers have two options:
- price reduction (the buyer keeps the property and receives compensation equal to the cost of repairs) — the preferred route when the defect is fixable
- cancellation of the sale (the sale is voided, the property is returned and the price refunded) — justified when the defect genuinely defeats the property’s intended use
The choice between the two depends on how serious the defect really is and how it’s quantified — both of which have to be demonstrated, not simply asserted, before a judge.
How to prove the defect: an adversarial survey

Almost everything comes down to proof, and sellers typically contest every point: the defect was visible, or it appeared after the sale. The answer is technical. An adversarial survey — with the seller present, dated measurements, a search for pre-existing signs, and a detailed costing of repairs — objectifies the damage. A private survey mainly documents the dispute and supports an amicable settlement; it isn’t binding on a court, where a judge appoints their own expert if the case goes to a formal référé procedure. For reference, one RICS-certified property survey firm based in Casablanca advertises this type of service starting at 3,500 MAD (excl. tax), with quotes within 24 hours — an indicative figure, not a fixed national rate.
The first reflex as soon as a problem appears: document it in writing, with dated photos, before any repair work. That record is what later proves the defect predates the sale.
Buying from a private seller or a developer: a distinction worth knowing
The regime described here — under the DOC — applies by default to any sale between private individuals. When buying from a professional (a developer, or an agency acting as seller), buyers can also invoke the conformity guarantee under consumer-protection law 31-08, on a separate legal basis. Our guide to the documents to request from a property developer details the paperwork that helps limit this risk upfront, before delivery.
Protecting yourself before you buy: a checklist
- Get an independent technical survey done before signing, especially for a riad, an older villa, or any property whose waterproofing, roof or structure aren’t visible during a simple viewing
- Visit the property during the rainy season if possible, or ask the seller in writing for a statement on the condition of the plumbing, waterproofing and any past incidents
- Keep every written exchange with the seller and agency before the sale — it can later prove the defect wasn’t disclosed
- If a defect turns up after the purchase, document it in writing with photos before any repair, then seek an adversarial survey quickly — the two-year clock starts running from delivery of the property
- Check the property’s legal and planning status beforehand: our guide to land title and moulkiya in Marrakech and our step-by-step property buying guide cover the other checks to run before signing
The bottom line
A hidden defect remains an inherent risk of buying an existing property, but it’s no longer a risk without recourse: the 2024 reform gives buyers more time to act, and two legal paths depending on how serious the defect turns out to be. The difficulty hasn’t changed: proving the defect was pre-existing and genuinely hidden, which makes a technical survey — before the purchase if possible, adversarial if a dispute arises afterward — decisive either way. Before committing to an older property in Marrakech, our article on mistakes to avoid when buying and our guide to the notary’s role round out this due diligence.
This article is for general informational purposes and does not replace legal advice tailored to your personal situation. Legal deadlines and their interpretation can change; always verify the current state of the law with a notary or lawyer before taking action or giving up a claim.
Keywords
Disclaimer : This article is editorial analysis and does not constitute financial, legal or tax advice. Any investment decision should be preceded by consultation with qualified professionals.
Sources
- Médias24 — Real estate: the warranty action deadline extended in favor of the buyer (05/09/2024)
- Secretariat-General of the Government — Official Bulletin No. 7328 of August 22, 2024 (law No. 40-24)
- ReaConsult — Hidden defects after a property purchase in Morocco: recourse, deadlines and proof (DOC)
- Bladi.net — Real estate in Morocco: an expert explains hidden defects (MAP, 30/04/2021)



