PHOENIX (AP) -- The Phoenix Suns finally got the best of the Dallas Mavericks . Barely.
Jared Dudley scored 12 of his 18 points in a third-quarter comeback and Phoenix held on to beat Dallas 96-94 on Thursday night, the Suns' first victory over the Mavericks in nine tries, four this season.
"This is definitely big for us," Dudley said. "We've struggled against this more than any other team, especially at home."
Dallas blew out the Suns in Phoenix 122-99 on Jan. 30.
Grant Hill scored 10 of his 15 points in the second half for Phoenix, but missed two free throws with 15.4 seconds left. Dallas had two chances after that, but Rodrigue Beaubois missed a driving layup, then couldn't hit an open 18-foot jumper at the buzzer.
"You are not always going to get your star players the shot at the end because they attract so much attention," Mavericks coach Rick Carlisle said, explaining the last play. "That is one of the reasons Rodrigue got so wide open."
One player who wondered why he wasn't in the game at the end was sharpshooter Jason Terry.
"I can't check myself in and out of the game," he said. "You got to ask the person who didn't have me in the game. Ask him his thoughts on why I wasn't in the game. What I think doesn't matter."
Asked why Terry wasn't in the game Carlisle simply said "coach's decision."
Marcin Gortat added 16 points and 12 rebounds as the Suns won their fourth straight home game, their longest streak in nearly two years. Steve Nash had 11 points and 11 assists.
Vince Carter and Dirk Nowitzki had 18 points apiece for Dallas in the Mavericks' fifth road loss in a row.
Phoenix, coming off a loss at Oklahoma City the previous night, outscored the Mavericks 31-8 over a stretch late in the third quarter and early in the fourth, erasing a 12-point deficit to go up by 11.
"We got the pace of the game up where we wanted it," Suns coach Alvin Gentry said. "Once again we came up with stops, which is really important to run off misses as opposed to taking the ball and running off makes. We had the game at the tempo where we wanted it and we were able to score."
Nash said the game was crucial as the Suns try to climb into contention for a playoff berth.
"We couldn't lose both of these (Oklahoma City and Dallas) and stay in the playoff picture," he said. "It's an early crunch time for us. We've got to keep crawling back to that eight-nine-ten spots and try to give ourselves a chance to sneak in there."
The Suns had an 18-4 outburst over the final 4 1/2 minutes of the third quarter to take a 78-76 lead entering the fourth. Phoenix added to the onslaught with a 13-4 run to start the final quarter. Sebastian Telfair made a 3-pointer, then Shannon Brown's thunderous dunk on a rebound put the Suns up 90-80. Hakim Warrick capped the outburst by making one of two free throws.
But the Suns failed to score in the final 2:46 after Warrick made one of two free throws to put Phoenix ahead 96-87.
Jason Kidd sank his third 3-pointer and Nowitzki's 14-footer cut the lead to 96-92 with 1:01 to play. Gortat scored on a layup but was called for an offensive foul. That led to Nowitzki's inside basket that cut the lead to 96-94 with 25 seconds left. Hill was fouled, but missed both free throws and Dallas called a timeout with 14.3 seconds to go.
Beaubois drove the lane but his shot in traffic was off the mark. The ball was knocked out of bounds, and after referees reviewed the replay, the ball was awarded to Dallas with 2.5 seconds left. Beaubois then misfired from 18 feet and Phoenix escaped with its sixth win in eight games.
"This was just a mental breakdown by our team," Carter said.
Dallas led 72-60 after Lamar Odom's 3-pointer with 4:43 left in the third quarter and was up 74-63 on his dunk with 3:59 to go. The Suns scored the next 11 to tie it 74-74 on Dudley's 20-footer with 1:34 left. Nowitzki's two free throws put Dallas back on top 76-74, but Nash made a 16-footer, then Dudley scored inside with 29.8 seconds left to give Phoenix the lead.
The Suns shot 74 percent in the third quarter (14 of 19).
Carter scored 11 in a 4 1-2 minute span late in the second quarter as the Mavericks took a 53-44 lead at the break. But he had only five points in the second half.
Notes: Phoenix wore its "Los Suns" jerseys for its annual tribute to the city's Latin heritage. ... The Suns last beat Dallas on Jan. 28, 2010, in Phoenix. ... The Mavericks were called for defensive 3 seconds violations four times. ... The Mavericks' last road win was on Feb. 17 at Philadelphia. ... The Suns are 6-1 at home since the players dressed up a model skeleton in the locker room with Warrick's jersey, headband and shoes.