Chris Willock netted the winner for 10-man Queens Park Rangers in an incredible see-saw second half at Middlesbrough to maintain their unbeaten start to the season.
Uche Ikpeazu gave Boro the lead with a seventh-minute penalty, but Jonny Howson's own goal put Rangers level just after the break.
Despite Moses Odubajo's red card, the visitors then went in front through Lyndon Dykes - only for Matt Crooks to rifle in Middlesbrough's equaliser.
But Willock grabbed the decisive goal 14 minutes from time and QPR clung on for three points.
Boro, who fielded the same side that started their 2-1 win against Bristol City, began on the front foot and almost went in front when Howson's low drive thudded against the post.