PHOENIX (AP) -- Golden State's biggest comeback of the season has the Warriors on the brink of their first playoff berth in six years.
Stephen Curry scored 18 points and matched his career high with 15 assists, sinking two late free throws to seal Golden State's 111-107 victory over Phoenix on Friday, extending the Suns' losing streak to a season-worst eight games.
Jarrett Jack's 3-pointer with 31.6 seconds to play pulled the Warriors out of serious trouble.
Klay Thompson scored 15 of his 25 points in the third quarter, when the Warriors stormed back from an 18-point first-half deficit. David Lee added 22 points and 14 rebounds for Golden State.
The Warriors can clinch a spot in the postseason for the first time since 2006-07 with a victory over Utah on Sunday at home.
''There are a lot of people in the locker room that haven't tasted it before,'' Curry said. ''For us to be right there and have a home game to clinch it, we understand we have a bigger goal than that, but it will nice to get the 'X' by your name.''
Goran Dragic tied his career high with 32 points and Michael Beasley added 25 for the Suns, who shot a season-best 61 percent from the field yet still managed to lose.
''For us to shoot 61 percent and still lose is mindboggling,'' Phoenix interim coach Lindsey Hunter said, ''but we had 22 turnovers in some crucial situations during the game. We got to keep working to clean those things up and try to take the little victories out of this and keep building.''
The Warriors have won three straight and five of six.
''Tonight showed the resiliency that we have built over the course of the season,'' Curry said. ''We are a lot more mature team and are playing a lot better basketball, obviously, going into the last six games of the year.''
Golden State swept the season series with Phoenix for the first time since 1976-77.
''We were not prepared in the first quarter. Our defense wasn't sharp. We were scoring but we were a step slow defensively,'' Warriors coach Mark Jackson said. ''Unacceptable, at the same time I am awfully proud of my guys. We responded. There was a time we would have to talk about it tomorrow and make the adjustment, but we talked about it at halftime. They came out and out together a picture perfect third quarter.''
Beasley, inconsistent all season, credited his better recent play by the fact that he no longer listens to anybody, his coaches included.
''I'm doing what I know how to do,'' he said. ''That's really it. The more I listen to people the more I got to think about. So at times it messes me up when I'm trying to think about a thousand things at once. Just stopped listening to people and just start trusting my instincts again.''
Consecutive baskets by Beasley cut the lead to 104-102 with 1:29 to play and Phoenix got the ball back, but Beasley's pass was intercepted by Carl Landry and Jack's 3 made it 107-102.
Dragic's two free throws with 22 seconds to go cut it to 107-104, then Curry threw the ball away for an over-and-back violation, giving the Suns the ball with 18 seconds left.
Jermaine O'Neal was fouled but made just the first of two free throws, keeping Golden State ahead 107-105 with 17.2 seconds to play. Curry's two free throws with 14.8 seconds left put the Warriors ahead 109-105.
O'Neal scored on a rebound with just 0.5 seconds to play, then Jack added two from the line to make the final 111-107.
Down 64-55 at the half, the Warriors mounted a 25-4 run to take an 87-76 lead on consecutive 3s by Thompson, the second with 54 seconds left in the period. Golden State outscored Phoenix 32-14 in the third quarter to lead 87-78 entering the fourth.
The Suns dominated most of the first half.
Beasley banked it in from just inside midcourt to give Phoenix a 37-23 lead after one quarter. Dragic scored 15 in the team's highest-scoring quarter of the season.
Beasley started the second quarter with a pair of jumpers to give Phoenix its biggest lead at 41-23 with 11:08 left in the half.
The Warriors rallied, and when Curry stole the ball from Dragic, scrambled to his feet, and sank a 3-pointer, Golden State cut the lead to 46-41 with 6:10 left in the half.
But the Suns stretched it back to 58-47 on Beasley's driving layup. His 11-footer in the lane with 1.5 seconds to go put Phoenix up 64-55 at the break.
Dragic was 7 for 7 from the field, two of them 3-pointers, for 21 first-half points. Beasley was 9 for 12 for 19.
Notes: Phoenix has lost a season-worst six in a row at home. ... Golden State has won six in a row over Phoenix dating to last season. ... Phoenix is 2-15 since winning three in a row Feb. 26-March 1. ... Curry's previous 15-assist game came against Sacramento on Feb. 17, 2010. ... Dragic's other 32-point game came for Houston against Utah on Jan. 25. 2010. ... Beasley was two points shy of his season high in scoring.