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.
Did you know?
It was the first time Boro have scored more than three goals at the Riverside in 101 league games.
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."
- 01 Steele
- 02 Hoyte (Parnaby - 21' )
- 14 Williams
- 39 Woodgate Booked
- 07 Leadbitter
- 10 Bailey
- 18 Halliday
- 33 Smallwood
- 09 Emnes (Jutkiewicz - 82' )
- 27 McDonald
- 30 Miller (Reach - 65' )
- 32 Leutwiler
- 21 Parnaby
- 25 Reach
- 05 Zemmama
- 08 Thomson
- 17 Jutkiewicz
- 22 Williams
- 01 Gilks
- 03 Crainey
- 15 Baptiste
- 17 Basham
- 20 Cathcart
- 42 Broadfoot
- 08 Gomes (Sylvestre - 57' )
- 11 Ince
- 12 Taylor-Fletcher
- 39 Thomas
- 40 Delfouneso (Angel - 37' )
- 21 Halstead
- 05 Eardley
- 33 Harris
- 14 Sylvestre
- 31 Angel
- 09 K Phillips
- 38 Dicko