SAN ANTONIO (AP) The Dallas Mavericks took advantage of uncommon mental mistakes by the veteran Spurs to snap a 12-game losing streak in San Antonio.

Seth Curry had 24 points and 10 rebounds, and Dallas beat San Antonio 105-101 on Sunday night to hand the Spurs consecutive losses for just the second time this season.

The Mavericks rallied from a 15-point deficit in the first half to win at the AT&T Center for the first time since Nov. 26, 2010.

''Six years since we got a win here, so sounds good,'' Curry said. ''But we played them a couple of times early in the year and came in here and had a chance to beat them. We were pretty confident coming in. I knew if we played 48 minutes of good basketball, we'd have a chance at the end.''

Kawhi Leonard had 24 points for San Antonio, which fell to 16-6 at home after tying the league mark with a 40-1 record last season.

''Too many mental errors defensively,'' Spurs coach Gregg Popovich said. ''I thought we did a really poor job discipline-wise. . Too many weak-side errors defensively where they got to the rim too easily. You know, we scored points. I know we got 100 points, 101 points, that's fine, but the mental mistakes were really costly.''

Curry broke free for an uncontested layup and a 103-98 lead with 17 seconds remaining after San Antonio had pulled within 100-98 following Leonard's blocked shot on Curry and Manu Ginobili's steal of Dirk Nowitzki's pass.

Dallas escaped a turnover with 25 seconds left when officials ruled Mavericks coach Rick Carlisle called a timeout before Danny Green tipped the ball away from Curry. The Mavericks finished with seven turnovers, the lowest by a Spurs opponent this season.

San Antonio held Dallas to five points in the final 3:47, but was unable to complete the rally.

Yogi Ferrell, who started a day after signing a 10-day contract with the Mavericks, made two free throws to give Dallas a 105-101 lead with 7.3 seconds remaining.

''We know he's a high-character kid from a great program at Indiana (University),'' Carlisle said. ''He's on a short list of called-up guys in the D-League, so this was a real opportunity for him. He played extremely well and it was only fitting that he had a chance to knock down the two game-winning shots.''

Harrison Barnes added 19 points and Wes Matthews had 17 for Dallas.

San Antonio turned in another lackluster fourth quarter after falling 119-103 in New Orleans on Friday.

In losing to the bottom two teams in the Southwest Division, the Spurs dropped consecutive games to teams whose combined 36 wins match San Antonio's.

''It doesn't matter who we lose to,'' Leonard said. ''It's always tough losing. We want to win every game. We've got another one coming up and we have to be prepared. We have to go in with the same mentality; play defense first and let the offense come.''

LaMarcus Aldridge and Tony Parker had 16 points apiece for the Spurs.

TIP-INS

Mavericks: Dallas is averaging 12.1 turnovers per game, second-fewest in the league. The Mavericks' seven turnovers were one fewer than the Los Angeles Clippers had in a 24-point victory over the Spurs on Nov. 5. . Dallas has the second-worst road record in the West at 7-19, trailing only the Lakers' 5-21 mark.

Spurs: Ginobili has 1,398 3-pointers, passing former teammate Brent Barry for 28th in league history. ... Forward Davis Bertans is just the fourth Spurs rookie with at least 35 3-pointers and 15 blocks in a season, joining Leonard, Ginobili and Lloyd Daniels. ... Bertans made his second career start. The Spurs lost for the first time in 11 games when a rookie starts.

FAST START

Ferrell was just hoping to play a few minutes to show he belongs in the NBA after appearing in 11 games with Brooklyn earlier this season.

Ferrell was averaging 18.6 points and 5.8 assists for the Long Island Nets of the Development League when he was signed by Dallas on Saturday.

He was stunned when Carlisle told him he would start in his first game with the Mavericks.

''Definitely very eye-opening,'' Ferrell said. ''When Coach told me that, my mind switched. I made sure I was ready.''

Ferrell finished with nine points and seven assists in 36 minutes.

''As the game went on, I kind of settled down and gathered myself,'' he said.

UP NEXT

Mavericks: Host Cleveland on Monday night.

Spurs: Host Oklahoma City on Tuesday night.

Copyright 2017 by STATS LLC. Any commercial use or distribution without the express written consent of STATS LLC is strictly prohibited.