When the book is written on the 2013-14 season, a chapter will undoubtedly be reserved to discuss the Dallas Mavericks’ propensity for living on the edge.

The Mavs put their daredevil lifestyle on display again Monday afternoon against Cleveland. The visitors from North Texas built a 24-point lead, then, as is their custom, had to wobble a bit before pulling out a pulsating 102-97 victory over the Cavaliers at Quicken Loans Arena.

While winning the opener of a three-game road trip, the Mavs improved to 25-18 and the Cavs dipped to 15-26. But when this one ended, it was difficult to tell if these teams belonged at different ends of the NBA spectrum.

Even owner Mark Cuban said: “We do our best to give the fans their money’s worth.”

When Shane Larkin drained a 3-pointer with 50.6 seconds left before intermission, the Mavs were coasting beautifully with a 59-35 lead, thanks to 14 points from Shawn Marion and 11 from DeJuan Blair.

But as the case has been for most of the season, a switch gets flipped and soon afterward the Mavs are in a fierce battle.

On Monday, the Cavs buckled down and a 3-pointer by Luol Deng got Cleveland within 91-89 with 3:25 remaining. From there, Monta Ellis made 5-of-8 free throws, assisted on a basket to Marion and Jose Calderon added a bucket as the Mavs narrowly escaped one of the NBA’s worst teams.

“That’s what we do,” said Dirk Nowitzki, in reference to testing fans’ patience. “We make things interesting down the stretch.

“We seem to never really get to pull away at the end and make it an easy night.”

The Cavs fought to the bitter end, but the Mavs should have put them away much earlier. And they might still be playing if not for a bonehead play by Cleveland.