A teatcup liner configured to be mounted in a shell of a teatcup to be attached to the teat of an animal to be milked, and having an elongated shape extending along a longitudinal central axis (x), the teatcup liner comprising a barrel having a length along the longitudinal central axis (x) from a lower border to an upper border and enclosing an inner space for receiving the teat, wherein the barrel comprises a lower section and an upper section (3") along the longitudinal central axis (x), the lower section adjoining the upper section (3") at a transition, wherein the barrel, in a rest state, has a polygonal cross-sectional shape transversely to the longitudinal central axis (x), the polygonal cross-sectional shape defining a plurality of side portions and a plurality of corner portions, each connecting two of said side portions, wherein each of the side portions has a side wall thickness (T 1) at least at a longitudinal centre line of the side portion along the length of the barrel, wherein each of the side portions in the rest state has a convex curvature towards the inner space and the longitudinal central axis (x) along the length of the barrel wherein each of the corner portions has a corner wall thickness (T 2) at least at a longitudinal centre line of the corner portion along the length of the barrel, wherein each of the corner portions in the rest state comprises an inner surface facing the inner space and having a concave curvature towards the inner space with an inner radius (r), which extends from the inner space to the inner surface and is in the rest state at least 4 mm at the longitudinal centre line of the corner portion at the upper border of the upper section, wherein the corner wall thickness (T 2) is thicker than the side wall thickness (T 1) along the length of the barrel, wherein the inner radius (r) of each of the corner portions at the longitudinal centre line decreases from the upper border to the lower border, characterised in that the corner wall thickness (T 2) decreases along the upper section (3") towards the lower section of the barrel, from the upper border to the transition. wherein the barrel comprises a lower section and an upper section (3") along the longitudinal central axis (x), the lower section adjoining the upper section (3") at a transition, wherein the barrel, in a rest state, has a polygonal cross-sectional shape transversely to the longitudinal central axis (x), the polygonal cross-sectional shape defining a plurality of side portions and a plurality of corner portions, each connecting two of said side portions, wherein each of the side portions has a side wall thickness (T 1) at least at a longitudinal centre line of the side portion along the length of the barrel, wherein each of the side portions in the rest state has a convex curvature towards the inner space and the longitudinal central axis (x) along the length of the barrel wherein each of the corner portions has a corner wall thickness (T 2) at least at a longitudinal centre line of the corner portion along the length of the barrel, wherein each of the corner portions in the rest state comprises an inner surface facing the inner space and having a concave curvature towards the inner space with an inner radius (r), which extends from the inner space to the inner surface and is in the rest state at least 4 mm at the longitudinal centre line of the corner portion at the upper border of the upper section, wherein the corner wall thickness (T 2) is thicker than the side wall thickness (T 1) along the length of the barrel, wherein the inner radius (r) of each of the corner portions at the longitudinal centre line decreases from the upper border to the lower border, characterised in that the corner wall thickness (T 2) decreases along the upper section (3") towards the lower section of the barrel, from the upper border to the transition.