ATLANTA — Guard Kyle Lowry shook off flu-like symptoms to score 31 points and help the Toronto Raptors overcome a 17-point deficit en route to defeating the Atlanta Hawks 96-86 on Wednesday.

Lowery actually left the court with 4:11 in the first half when he felt sick to his stomach. He returned in the second half and scored 16 of the team’s points during an 18-4 run in the fourth quarter, when the Raptors went from seven points behind to seven points ahead. He scored 22 points in the fourth quarter.

Lowery shot 9-for-17 from the field and was 11-for-12 from the line. He added five rebounds and five assists. Guard DeMar DeRozan added 17 points and guard Cory Joseph added 10 points for the Raptors (12-7)

Atlanta (12-9) was led by forward Paul Millsap with 14 points and nine rebounds. Forward Thabo Sefolosha added 13 points and five rebounds. Guard Kyle Korver scored 12 and center Al Horford had 12 points and nine rebounds. Guard Jeff Teague added 11 points and 10 assists.

The loss ended Atlanta’s 35-game streak of wins when it led after the third period.

Neither team shot the ball well in the opening quarter and neither team led by more than three points. Toronto shot 35 percent from the floor. Atlanta made only three of its first 12 shots and shot 30.4 percent for the period, but led 18-16 after one quarter.

The Hawks got hot in the second period, shooting 50 percent, and outscored the Raptors 28-16 to take a 46-32 lead at the half. It was the fewest points allowed in a half by Atlanta this season. The Hawks led by as many as 17. Sefolosha, starting at forward in place of injured Tiago Splitter, scored 11 in the first half.

The Raptors had two players injured in the second quarter. Forward Patrick Patterson’s face was cut by the hand of Atlanta guard Dennis Shroder on a drive to the basket, forcing him to bench only 1:18 into the quarter. Guard Kyle Lowery left the court with an upset stomach with 4:11 left and walked directly to the locker room. Lowery returned to start the second half. Patterson returned late in the third period.

The Raptors closed the gap to 66-57 by the end of the third quarter with DeRozan scoring seven in the period. Forward Terrence Ross came off the bench to hit a 3-pointer and convert a 3-point play to draw Toronto as close as seven points with 33.3 seconds left.

NOTES: The Hawks are averaging 25.5 assists per game. The Raptors haven’t had that many in one game. … Atlanta F Tiago Splitter (right hip) was a part-time participant in practice on Tuesday but was held out of his sixth straight game. G Tim Hardaway Jr. was the team’s other inactive. … Inactive for the Raptors were C Jonas Valanciunas (fractured left hand) and F James Johnson (sore left Achilles). F Bruno Caboclo and G Delon Wright were on the active list for the Raptors after serving a D-League assignment. … Up next: the Hawks play host to the Los Angeles Lakers on Friday in Kobe Bryant’s final appearance in Atlanta. Toronto returns home on Thursday to face Denver.