PORTLAND, Ore. (AP) Wesley Matthews spent enough time with Damian Lillard in Portland to know exactly what he was going to do in the waning seconds Wednesday night.

''Dame to get the ball and Dame to shoot it,'' Matthews said.

The former Trail Blazers guard pressured Lillard into missing a potential game-winning 3-pointer at the buzzer, and the Dallas Mavericks held off a furious Portland rally for a 96-95 victory.

''Obviously, I've been his teammate so I know the kind of clutch gene he has,'' said Matthews, who played in Portland from 2010-15. ''We ended up getting the stop that we needed.''

Harrison Barnes had 28 points and Deron Williams added 23 for the Mavericks, who led by 25 in the third quarter.

Lillard finished with 29 points, including 20 in the third. It was Portland's fourth straight loss.

The Blazers were slow to get going for the second of a back-to-back, but Lillard paced the comeback. His reverse layup pulled Portland to 88-82 with 6:31 remaining.

Allen Crabbe pumped his fist after his 3 with 2:42 left trimmed it to 90-88. After Williams' jumper for the Mavericks, Al-Farouq Aminu made a 3 and the Blazers were back within two.

The teams traded baskets but Dallas turned over the ball on a shot-clock violation leading 96-95 with 20.3 seconds to go. Lillard's turnover on the other end gave it back to the Mavs, but Mason Plumlee grabbed Williams' bad pass and Portland called a timeout with 9.8 seconds left.

Then came Lillard's final attempt at the buzzer.

''There's nobody like Wes Matthews on defense at the end of the game,'' Mavericks coach Rick Carlisle said. ''The guy's unbelievable - one of the guys that really willed us to win.''

Lillard said afterward that in the time it took to try and shake Matthews, the clock had run down and he was forced to shoot.

But the star guard is confident the Blazers will pull out of the funk they're in.

''Our team has faith,'' he said. ''The best thing is we know we haven't shown our best.''

The Trail Blazers were coming off an emotional game the night before in Sacramento, where they lost 126-121.

The Mavericks were again without Dirk Nowitzki because of a strained right Achilles, but the 13-time All Star is nearing a comeback. Nowitzki could return as early as Friday night against the Clippers.

Dallas will ease him back slowly.

''He's made gradual but steady gains in his recovery,'' Carlisle said.

Portland was without reserve Evan Turner, who has an ankle injury and was wearing a boot before the game. But the Blazers did get back Aminu, who had been out the previous four games with a sore back.

The Mavericks built a 12-point lead in the first quarter and Seth Curry hit a 3 at the second-quarter buzzer to send the Mavericks into halftime with a 62-38 advantage.

In the second half, Barnes' 18-foot fadeaway put the Mavs up 69-44. Crabbe's 3 narrowed Portland's deficit to 88-80 with 7:24 left.

TIP-INS

Mavericks: J.J. Barea played 9 minutes in the first half but left the game because of left Achilles soreness. ... Barnes has scored 20 or more points 15 times this season.

Trail Blazers: Maurice Harkless fouled out with 4:34 to play. ... Crabbe led all reserves with 14 points. ... Portland outscored the Mavericks by 23 points in the second half.

McCOLLUM CARES

Blazers guard CJ McCollum was honored with the NBA Cares Community Assist award for November. In an effort to promote literacy and career development, McCollum collaborated with the Boys & Girls Clubs of Portland to open the CJ McCollum Dream Center. The space will host different clubs, programs and speakers to inspire kids.

SIMILARITIES

Carlisle said in many ways the Blazers are similar to the Mavericks, in that both teams are struggling with early-season losses and establishing an identity. He emphasized that there's a lot of season left: ''We have to look at this as a big-picture situation and get better every day,'' he said.

UP NEXT

Mavericks: Visit the Los Angeles Clippers on Friday.

Trail Blazers: Host the San Antonio Spurs on Friday.

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