CHARLOTTE -- Harrison Barnes had 25 points and 11 rebounds, Yogi Ferrell made seven 3-pointers and scored 22 points and the Dallas Mavericks fended off fatigue to beat a fresh Charlotte Hornets team 115-111 on Wednesday night.

Dirk Nowitzki added 19 points for the Mavericks, and Dennis Smith Jr. had 15.

The Mavericks were playing their third game in four days, while the Hornets were coming off a four-day layoff. But Dallas showed no signs of wearing down in the fourth quarter, repeatedly thwarting Charlotte's attempts to take the lead.

Kemba Walker had 41 points on 16-of-28 shooting for the Hornets. Dwight Howard had 15 points and 12 rebounds for Charlotte, but was an anemic 5 of 18 from the foul line which proved costly in a close game.

Charlotte trailed by six entering the fourth quarter, but Jeremy Lamb buried a 3-pointer from the right wing to pull the Hornets even with 9 minutes left.

But the Hornets could never grab the lead.

The big play came with 2 minutes remaining when Salah Mejri ripped an offensive rebound away from Howard and kicked out a pass to Ferrell, who knocked down a 3-pointer from the top of the key to give the Mavericks a 5-point lead.

Barnes followed with a long 3 on the next possession.

The Hornets weren't done though, battling back to cut the lead to 111-110 with 31 seconds left on a pair of layups by Walker, including one off a half-court steal.

But after a miss by Walker, Barnes put the game away with two free throws with 10 seconds left.