According to French law, employers have to pay at least six months salary to employees whose seniority exceeds two years in case of unfair dismissal. We show, relying on data, that this regulation entails a hike in severance payments at two-year seniority which induces a significant rise in the job separation rate before the two-year threshold and a drop just after. The layoff costs and its procedural component are evaluated thanks to the estimation of a search and matching model which reproduces the shape of the job separation rate. We find that total layoff costs increase with seniority and are about four times higher than the expected severance payments at two years of seniority. Counterfactual exercises show that the fragility of low-seniority jobs implies that layoff costs reduce the average job duration and increase unemployment for a wide set of empirically relevant parameters.