Cardiff City have been relegated from the Premier League after suffering a 3-2 home defeat by Crystal Palace.
Neil Warnock's side knew they had to avoid defeat to keep alive their hopes of staying up, but fell behind in the 28th minute to a low strike by former player Wilfried Zaha.
Cardiff were level three minutes later when Palace’s Martin Kelly diverted Leandro Bacuna’s cross into his own net.
But Michy Batshuayi restored Palace’s lead after a one-two with Jordan Ayew before half-time and Townsend extended it in the 70th minute with a solo effort.
Cardiff kept battling and Bobby Cordova-Reid curled in a late consolation.
But the Welsh team's one-year stay in the Premier League is over as their 18th place was confirmed.
Palace move up to 12th on 46 points.
See: Cardiff report | Palace report
Next fixtures
Cardiff: 12 May v Man Utd (A)
Crystal Palace: 12 May v AFC Bournemouth (H)