DALLAS -- Manu Ginobili scored 23 points, Boris Diaw hit a go-ahead 3-pointer in the final minute and the San Antonio Spurs held off a second-half surge by Dallas to beat the Mavericks 93-89 on Monday night, pulling even in their first-round playoff series.
The Spurs regained the home-court advantage by getting a split of two games in Dallas, matching what the eighth-seeded Mavericks did in San Antonio.
Contact information ( * required )
The Spurs led by 20 points in the third quarter before the Mavericks pulled even midway through the fourth quarter of Game 4. The score was still tied when Diaw hit from long range over Dirk Nowitzki at the top of the key for a 90-87 lead.
Monta Ellis led Dallas with 20 points but missed two potential tying shots after Diaw's basket.
Game 5 is Wednesday night in San Antonio.
Nowitzki, who had 19 points and was held under 20 in a fourth straight playoff game for the first time since his first postseason in 2001, had a putback on a missed 3 by Ellis to get Dallas within 90-89. But the Mavericks let nearly 10 seconds run off the clock before fouling Ginobili with 10 seconds left.
Ginobili missed one of the free throws, giving Ellis a chance to tie on a driving layup two nights after Vince Carter hit a buzzer-beating 3-pointer for a one-point Dallas win in Game 3. Ellis' shot rimmed out, and Ginobili hit two more free throws to clinch the win.
Tim Duncan and Tiago Splitter had double-doubles for the Spurs, with Duncan getting 14 points and 10 rebounds and Splitter adding 10 points and 12 boards. Diaw finished with 17 points.
San Antonio, which led from early in the second quarter until late in the fourth, was down 83-82 when former teammate DeJuan Blair was ejected for kicking Splitter in the back of the head after getting called for a foul when he got tangled up with the San Antonio center as both players fell to the court.
Ginobili, who had five assists, made the technical free throw for an 83-all tie, and Splitter hit both free throws on the foul for an 85-83 San Antonio lead.
Blair had a big hand in getting Dallas back in the game, scoring all 12 of his points and grabbing nine of his 11 rebounds in the second half.
Both teams wore black socks in support of the Los Angeles Clippers as the NBA investigates racist comments that owner Donald Sterling is alleged to have made in a taped conversation.
San Antonio coach Gregg Popovich challenged his team to play with more "nastiness" after falling behind in the series with two straight losses, and his Spurs responded in the first half.
The best display was in a dominant second quarter, when the Spurs outscored the Mavericks 32-13. Kawhi Leonard intended to swat Carter's driving shot into the stands. Instead, Patty Mills dived into the seats to save it, sending the Spurs on a fast break that ended with a miss by Tony Parker.
Parker's miss didn't matter, though, because the Mavericks were in the middle of a 5-minute scoreless stretch that included eight straight misses to cap a 2-of-18 shooting spell from late in the first quarter to late in the second. Dallas shot 21 percent in the second quarter.
The Mavericks warmed up in the second half, but still finished at 38 percent. Ellis was 6 of 20 from the field.
Dallas hurt itself with missed free throws. Samuel Dalembert was 1 of 6 from the line two nights after he hit two late to get Dallas even in a back-and-forth final minute. The Mavericks were 18 of 28 from the line.
NOTES: Dalembert had 15 rebounds but just three points. ... The Spurs improved to 25-0 on the road when leading after three quarters. They are 53-1 overall.