PHILADELPHIA (AP) -- With the Detroit Pistons mired in a six-game losing streak, Josh Smith couldn't believe his team could fall behind by 16 points in the first quarter.
He decided to do something about it.
Smith had 22 points in an outstanding all-around game, Brandon Jennings made four 3-pointers in the second half and the Pistons ended their slide with a 114-104 comeback victory over the Philadelphia 76ers on Friday night.
''I was frustrated because of the fact we were on a six-game losing streak and it was disheartening to see us not come out with the kind of desperate energy we needed in order to get off the skid,'' Smith said.
He certainly played with his share of desperation. The 76ers said Smith became the third player in NBA history with 22 points, 13 rebounds, seven assists, five blocks and four steals in a game, according to the Elias Sports Bureau.
The other two were Hakeem Olajuwon and Kareem Abdul-Jabbar, who did it twice. Smith was the only one of the three to hit a 3-pointer in the game. He made two of them, although the forward shot just 2 for 8 from 3-point range and 8 of 23 from the field.
''He was around the rim all night,'' Pistons coach Maurice Cheeks said. ''He was there to clog the middle.''
Five other players scored in double figures for the Pistons, who averaged just 88.8 points during their skid. Kyle Singler and Will Bynum each had 16 off the bench.
''Whenever those guys come off the bench to give us positive minutes, it makes us that much better,'' Smith said.
Thaddeus Young scored 22 points for the Sixers, who have lost three straight after reeling off four consecutive road wins. Michael Carter-Williams added 21 points, Evan Turner had 19 and Spencer Hawes finished with 16 points, 10 rebounds and six assists.
The game marked Cheeks' first return to Philadelphia as a visiting head coach since being fired by the Sixers in 2008. Cheeks coached in Philadelphia for three seasons and was an assistant with Oklahoma City from 2009-13 before getting hired by Detroit last June.
The homecoming meant little to him, though.
''It didn't matter where we were,'' Cheeks said. ''We just needed to get the win.''
The Pistons outrebounded the Sixers 62-42, tying the Wells Fargo Center record for offensive rebounds with 25. They also finished with a season-high 14 blocks.
Detroit led 100-98 with 5 minutes remaining before scoring the next nine points, including a 3 by Jennings with 3:21 left that just about put the game away.
''They made a run we couldn't come back from,'' Turner said.
Trailing by double digits for most of the first half, the Pistons staged an early third-quarter rally, going on a 15-2 run to take their first lead at 70-69. The spurt was capped by back-to-back 3s from Jennings - his first two field goals of the game.
Jennings, the team's leading scorer, had 18 of his 19 points in the second half.
''We just kept fighting,'' Jennings said. ''The second half we had was probably one of our best second halves we had all season.''
The Sixers made nine of their first 10 shots to take control early, opening a 22-7 lead with 7:46 remaining in the first quarter. The Pistons scored the final seven points of the period to trim it to 36-28, and their deficit remained eight heading into halftime.
And then in the second half, they struck.
''Hopefully this is a springboard to get us going,'' Cheeks said.
NOTES: Sixers forward Lavoy Allen missed his first game of the season with a right calf injury. Arnett Moultrie also was out (left ankle). ... Allen Iverson sat courtside and received a raucous ovation when he was shown on the big screen. Iverson's jersey will be retired at halftime of Philadelphia's game against the Washington Wizards on March 1. ... Despite struggling badly on the boards, the Sixers outscored the Pistons 64-50 in the paint. ... Pistons center Andre Drummond, who had a career game against the Sixers on Dec. 1 with 31 points, 19 rebounds and six steals, was held to 11 points and picked up a technical foul late in the third quarter. ... The Sixers shot 31.9 percent from the field in the second half after shooting 54.2 percent in the first half.