Middlesbrough beat Blackpool to maintain the pressure on Cardiff and Hull at the top of the Championship.
Ishmael Miller's header from a corner and Richard Smallwood's confident finish from the edge of the box gave the hosts a 2-0 half-time lead.
Wes Thomas squeezed a shot inside the near post to pull one back but Scott McDonald drilled in Boro's third.
Chris Basham made it 3-2 but Tom Ince had a penalty saved by Luke Steele before Adam Reach sealed the victory.
The win was Boro's first over Blackpool for 39 years and kept them within a point of the automatic promotion places.
Tony Mowbray's side were looking for their fourth successive home win and caused the visitors problems from the off.
Pools goalkeeper Matt Gilks was struggling to cope with early corners and opted stay on his line on 14 minutes, giving Miller time and space to head into the bottom corner.
The striker's goal ensured Boro have scored in all 12 of their home games this season.
Smallwood, who came through the ranks at the Riverside, doubled the lead just before the break with his third senior goal.
Thomas pulled a goal back for the visitors but the two-goal cushion was restored three-minutes later when Blackpool were caught in possession and McDonald raced forward before calmly beating Gilks.
Basham reduced the arrears again for the visitors, who could have then been level when they were awarded a penalty, with nine minutes to go.
Jonathan Woodgate was penalised for bringing down Ludovic Sylvestre but Ince failed to convert from the spot, with Steele guessing the right way to make the save.
They were made to pay when substitute Reach made it 4-2 with his second goal of the season two minutes from time.
Middlesbrough manager Tony Mowbray said: "I was pleased because in the first half we played some fabulous football. It was as good as we have played all season.
"We knew they would come at us in the second half because we couldn't keep that level of play up and they had to gamble a bit."
Blackpool boss Michael Appleton added: "It was disappointing for myself and the staff and more so for the players because they were well short of how they can play.
"When I took over people told me when Blackpool are good - very, very good - but when they are bad they are awful. I think in the first half I saw that bad side."