QPR won their opening home league fixture of the campaign on a hugely-entertaining afternoon in W12.
Rangers raced into a three-goal leading when the returning Chris Willock (13 minutes), Jimmy Dunne (27) and Lyndon Dykes (38) all netted before half-time.
However, visitors Middlesbrough were a different team after the break - perhaps boosted by Matt Crooks’ strike four minutes prior to the interval.
Brentford loanee Marcus Forss reduced Boro’s deficit to just one goal in the 56th minute.
The visitors threw everything at the game thereafter - but the R’s displayed real grit to hang onto their lead ultimately as Mick Beale collected his first competitive win as head coach.
Boro’s Darragh Lenihan was also sent off in second-half injury time for a bad challenge on Macauley Bonne.
Beale made three changes to his side for the visit of Middlesbrough following last weekend’s opening-day defeat at Blackburn Rovers.
Willock returned for his first appearance since March, while there were also first starts of the season for Luke Amos and Jimmy Dunne.
Andre Dozzell and Mide Shodipo dropped down to the bench. Jake Clarke-Salter (hamstring) missed out altogether.
On kick-off, there was quite the atmosphere inside a packed Loftus Road - only amplified by England Euros winner and self-confessed R’s fan Chloe Kelly presenting the match ball to referee Josh Smith just before the action got underway.
No doubt buoyed by the crowd, Rangers really did start on the front foot - and Willock marked his return from a hamstring injury in sublime fashion come the 13th minute.
Advancing from inside his own half and shrugging off two Boro markers, the former Benfica man subsequently buried his 25-yard effort into the top right-hand corner to bring the W12 to their feet once more.
Then, after Dykes forced a fingertip save from Zack Steffen in the 26th minute, the R’s doubled their lead from the resultant corner.
Ilias Chair’s set-play was misjudged by Steffen as he came to collect the ball, gifting Dunne a simple finish with his head from close range.
Rangers’ tails were firmly up and, after Chair so nearly caught the Boro ‘keeper out with a free-kick near the halfway line, Dykes made it 3-0 in the 38th minute.
Skipper Stefan Johansen’s floated free-kick saw the Scotland number nine subsequently lose his marker, before Dykes headed low beyond Steffen.
But Boro gave themselves a lifeline shortly before half-time.
Ryan Giles’ corner teed up Crooks to head home in the 41st minute, bringing the visitors back within two goals.
Then, after Seny Dieng pulled off an outstanding save to deny half-time substitute Chuba Akpom’s 54th-minute header, Middlesbrough make it 3-2 in the 56th.
Crooks turned provider, laying on Forss to slide home from close range.
By now, Rangers were having to withstand heavy pressure - but Chair had an opportunity to make it 4-2 shortly after Boro’s second goal, shooting straight at Steffen from point-blank range following a mix-up in defence.
After his outstanding opener in the first half, Willock produced a vital block just past the hour mark as the visitors piled on the pressure.
Willock was eventually replaced in the 73rd minute, making way for Albert Adomah, before Boro thought they’d equalised through sub Paddy McNair in the 76th - only to be denied by the offside flag.
As the clock ticked down, Adomah fired an effort just past the foot of the left-hand post following an intricate counter-attacking move.
Dozzell subsequently replaced Johansen, and Rangers had a little bit more control after that - managing the game effectively.
After Dykes got on the end of Adomah’s pass before seeing his effort deflect just behind, Dykes himself and Chair were replaced by Bonne and Niko Hamalainen in the 87th minute.
Some six minutes were added on at the death, but there would be no further goalscoring action.
There was time for a straight red card, though, as Lenihan was dismissed for a knee-high challenge on Bonne.
Three-two to the Super Hoops.