A non-compete agreement in Spain is a commitment by an employee not to work for a competitor for a period after leaving the company, in exchange for financial compensation. It is governed by Article 21.2 of Spain's Workers' Statute (Estatuto de los Trabajadores): it can last at most two years for technical staff and six months for other employees, and it is only valid if the employer has an effective industrial or commercial interest and pays adequate compensation. For a tech company hiring engineers in Spain, it protects a specific product during an exit; it is not a retention tool.
What a post-employment non-compete agreement is in Spain
A post-employment non-compete agreement in Spain is a clause in the employment contract, or a separate agreement, in which the employee gives up competing with the company once the contract ends and the company pays for that commitment. Article 21.2 of Spain's Workers' Statute calls it a "non-compete agreement for after the employment contract has ended".
While the contract is in force, an engineer in Spain is already barred from competing. Article 5(d) of the Workers' Statute makes not competing with the company's business a basic duty of every employee, and Article 21.1 bars working for other employers where that amounts to unfair competition. The non-compete agreement covers what those two rules do not: the period after the employee leaves.
An example for a tech profile: a fintech agrees with its machine learning lead that, for one year after leaving, the engineer will not build credit-scoring models for another fintech. In return, the fintech pays compensation. If that engineer joins a video game studio, the agreement does not apply.
When a non-compete clause is valid in Spain
A non-compete clause is valid in Spain if it meets the conditions of Article 21.2 of the Workers' Statute: it does not exceed the maximum duration, the employer has an effective industrial or commercial interest in it, and the employee receives adequate financial compensation. Without the business interest or the compensation, the clause is not valid.
An effective industrial or commercial interest means the company stands to lose something concrete if that person works for a competitor: customers, a product in development or technical know-how that is not public. In practice, a non-compete makes sense for the engineers who hold that know-how (the staff engineer who designed the pricing engine, the head of security), not for the whole team.
A Spanish non-compete is also a two-sided agreement. The Social Chamber of Spain's Supreme Court restated this in its judgment of 25 January 2024 (STS 347/2024): whether the agreement applies cannot be left to the employer's discretion.
How long a non-compete can last in Spain
A non-compete agreement in Spain can last at most two years for technical staff and six months for all other employees, under Article 21.2 of the Workers' Statute. The period starts when the employment contract ends.
The limit is a ceiling, not a recommended length. For a software engineer, the right length is how long the know-how they take with them stays sensitive: a product roadmap can go stale within months. The longer the non-compete, the more the company has to pay for the compensation to remain adequate.
How much compensation a Spanish non-compete requires
Spain's Workers' Statute sets no amount or percentage for non-compete compensation: it requires the compensation to be "adequate". Spain's Supreme Court assesses it case by case, and requires it to make up for what the employee gives up and to be proportionate to the harm caused, according to its judgment of 26 January 2024 (STS 517/2024).
In that case, the non-compete ran for two years and set €400 a month, of which the company paid only €200. With net pay of €1,600 and the maximum legal duration, the Supreme Court held that the compensation was not adequate.
The factors that weigh in that assessment are the length of the non-compete, how broad the restricted sector is and the person's salary. Small compensation relative to salary, on a two-year non-compete, is the case the Supreme Court held inadequate.
How to size non-compete compensation for a software engineer
Non-compete compensation for an engineer in Spain is sized against what that person loses by not being able to work in their sector. According to Kulturo's salary analysis, a senior engineer with six or more years of experience earns €58,000–72,000 gross a year in Spain's product and startup segment, and more than €80,000 at lead or staff level or in scarce specialisms. The full breakdown is in Kulturo's guide to software developer salaries in Spain.
At those salaries, token compensation does not meet the adequacy requirement. The agreement should state the amount in writing, say whether it is paid during employment or after it ends, and show it as a separate line from salary on the payslip, so it is not mistaken for ordinary pay.
Non-compete vs non-competition, retention agreement and NDA in Spain (2026)
Spain's non-compete agreement, the in-employment duty not to compete, the retention agreement (pacto de permanencia) and the non-disclosure agreement (NDA) protect different things. The table compares them on the same attributes under the Workers' Statute in force in 2026.
| Attribute | Duty not to compete (Art. 5(d) and 21.1) | Non-compete agreement (Art. 21.2) | Retention agreement (Art. 21.4) | Non-disclosure agreement (NDA) |
|---|---|---|---|---|
| Purpose | No competing while employed | No competing after leaving | Employee stays until a set date | No disclosing or using confidential information |
| When it applies | During employment | After the contract ends | During employment | During and after, as agreed |
| Maximum length | The length of the contract | 2 years for technical staff, 6 months for others | 2 years | As agreed |
| Compensation | No separate compensation | Adequate financial compensation, mandatory | Professional specialisation paid by the employer | Not required by the Workers' Statute |
| If breached | Unfair competition during employment | What the agreement sets, with a proportionate penalty clause | Damages payable to the employer | What the agreement sets |
The NDA distinction matters most in tech: an NDA protects information, while a non-compete limits where the person can work.
When a retention agreement can be required in Spain
A retention agreement in Spain obliges the employee to stay with the company for up to two years, and it can only be agreed if the employee has received professional specialisation paid for by the employer to launch specific projects or carry out specific work, under Article 21.4 of the Workers' Statute. It must always be in writing.
If the employee leaves before the agreed date, the employer is entitled to damages. For an engineer, the typical case is costly, specific training paid by the company, such as an advanced certification on the cloud platform they will run. A retention agreement without that specialisation does not meet Article 21.4.
Can the employer waive a non-compete in Spain
An employer in Spain cannot reserve the right to waive a non-compete on its own to avoid paying the compensation. Spain's Supreme Court struck down that option in its judgment of 15 January 2009 (STS 101/2009), because the agreement creates reciprocal obligations for both parties.
The Supreme Court has kept that position. In its judgment of 14 May 2009 (STS 3537/2009), it applied the same rule to a contract ended during the probation period, and in its judgment of 25 January 2024 (STS 347/2024) it annulled a clause that let the company choose, when the contract ended, whether to apply the non-compete.
For the employer, the consequence is about planning: a Spanish non-compete is signed on the basis that it will be paid. If the company is unsure it will need one, leaving it out works better than adding it with an exit option a court can annul.
What happens if an employee breaches a non-compete in Spain
If an employee breaches a valid non-compete in Spain, the employer can claim what the agreement sets, for example repayment of the compensation received, and any penalty clause must be proportionate. In its judgment of 1 December 2021 (STS 4491/2021), Spain's Supreme Court found it disproportionate to claim double the amount received, €52,000, and upheld limiting the claim to the €26,000 the employee had been paid for the non-compete.
How the compensation is paid also matters. In its judgment of 25 February 2026 (STS 1090/2026), the non-compete had been compensated with any pay rise above the collective agreement salary and was declared void; the Supreme Court held that the employee did not have to repay those amounts, because they were salary rather than compensation for not competing. Paying the compensation as its own item, separate from salary, avoids that outcome.
Does a non-compete help retain engineers in Spain?
A non-compete does not retain an engineer while they work for the company, because in Spain it only takes effect after the contract ends. What it does is make a move to a direct competitor slower and more expensive, and the company pays for it throughout that period.
For a senior candidate, a two-year non-compete is also a term that weighs on the offer, because it narrows their options for that time. Retaining an engineer depends mainly on salary, the project and, at startups, equity. The total cost of a hire, including employer Social Security contributions, is broken down in Kulturo's guide to the cost of employing a software engineer in Spain.