Swansea booked their place in the Championship play-offs after a 2-2 draw at Reading, while James Collins was on the mark for Luton in their 3-2 win away at Bristol City.
Barnsley and Bournemouth join the Swans in the end-of-season shoot-out alongside already-qualified Brentford.
Swansea, with Conor Hourihane starting, dominated much of the first half but fell behind against the run of play when Yakou Meite nodded home in the 31st minute.
Opportunist second-half efforts from Jamal Lowe and top scorer Andre Ayew gave Swansea the lead, with Tomas Esteves' late equaliser for Reading proving irrelevant.
Luton, who sit mid-table, came from behind to to take the points at Ashton Gate.
First-half goals from Nahki Wells and Adam Nagy had The Robins in command at the break.
A headed goal from James Collins sparked the Hatters' revival on 59 as he got on the end of a Kiernan Dewsbury-Hall's corner.
Another delivery from Dewsbury-Hall was then turned into the net by Elijah Adebayo ten minutes later, before Harry Cornick pounced on a loose ball in the area on 74 to give the visitors victory.