DETROIT (AP) -- Journeyman shooter Wayne Ellington didn't get much attention after he signed a free-agent deal with the Detroit Pistons in early February.
Thursday, he showed why Pistons coach Dwane Casey was thrilled by the move.
Ellington scored 17 of his 25 points in the third quarter and Detroit defeated the Orlando Magic 115-98 in a matchup of teams battling for Eastern Conference playoff positions.
"I was jumping up and down when I found out we had a chance to sign Wayne," Casey said. "I remember all the times he's killed me in the playoffs for a bunch of different teams, and he was magnificent tonight."
Detroit had just traded their best 3-point shooter, Reggie Bullock, to the Los Angeles Lakers and badly needed a veteran who could step into the starting small-forward spot.
That's when Ellington entered the picture. He had just been traded from the Miami Heat to the Phoenix Suns -- his eighth NBA team -- only to be waived. When he became a free agent, the Pistons were waiting.
Ellington has played 21 games for the Pistons, averaging 11.3 points and hitting 41.2 percent of his 3-point attempts.
"I am learning a lot from Wayne," said Luke Kennard, who hit both of his 3-point attempts as Ellington's backup. "You look what he did tonight in a game we needed to win. That was huge."
Blake Griffin had 20 points and 10 rebounds for Detroit, which was coming off a 1-4 road trip. Andre Drummond had 18 points, 18 rebounds and six blocks, and Ish Smith scored 15 points off the bench.
"I want to say something about Andre Drummond," Casey said. "We didn't run a single play for him tonight -- not one -- and he came back with 18 points and 18 rebounds. He's playing tremendous basketball."
Aaron Gordon scored 20 points for Orlando, and former Pistons player D.J. Augustin added 18 points.
"I think we had a toughness about them tonight that we weren't ready to match," Gordon said. "It's a disappointing loss, but we still have chances to make up for it."
The Pistons won their 10th straight home game and moved into a tie with the Brooklyn Nets for the sixth seed in the conference. The Magic had won six straight to get back into playoff contention.
"We knew how well they were playing, 6-0 in their last six, so we knew we needed to get back into a flow," Griffin said. "I liked the way we stepped up and met the challenge."
The loss left Orlando a half-game behind Miami in the race for the eighth seed. The Heat beat Dallas 105-99 Thursday.
The Pistons built a 60-46 halftime lead with their outside shooting, making 9 of 16 3-pointers in the first half. The margin could have larger, but Orlando held an 11-2 edge on the offensive glass.
Ellington hit two of his five 3-pointers in the first half, then started the third quarter with four straight 3s in the first 3:08, giving the Pistons a 72-52 lead.
"They were getting wide open looks," Orlando coach Steve Clifford said. "No matter what they did, they got so much separation, and Ellington was just terrific. Their defense was good and ours lacked."
Detroit went up 86-60 on a dunk by Drummond off a lob from Reggie Jackson, forcing Clifford to call his second timeout of the quarter.
"Griffin was terrific, Drummond controlled the glass and their perimeter players scored," he said. "Dwane had them more ready than I did."
Magic: Orlando had won six of the last nine meetings with Detroit, but lost the season series 3-1. ... Nikola Vucevic had 12 points and 12 rebounds -- his 56th double-double of the season -- but was just 5 of 15 from the floor.
Pistons: Ellington has scored 20 or more points three times since signing with the Pistons on Feb. 9. ... Detroit's 10-game home winning streak is the team's longest since a 16-game streak in 2005-06.
Magic: At the Indiana Pacers on Saturday.
Pistons: Host the Portland Trail Blazers on Saturday.