For all the Rockets’ missteps and Mavericks’ leads along the way, the Rockets kept finding a way to stay in the game to try to steal it in the final minute.

They got just enough from rookies Patrick Beverley and Thomas Robinson, though both made crucial mistakes in the final minute. They had James Harden living at the line. They even got the late stops they needed with Dirk Nowitzki missing a pair of shots he almost never misses.

With the game on the line, however, Harden could not close it out. Harden missed a 3-pointer for the lead and a drive to tie, and the Mavericks held on 112-108 on Wednesday at American Airline Center.

The Rockets had repeatedly rallied with the bench carrying the load, but the best stretch might have been down the stretch when Rockets coach Kevin McHale went with Robinson and Beverley.

With the Mavericks up six midway through the quarter, Robinson scored on a strong drive and reverse before the 6-1 Beverley emphatically rejected a Nowitizki drive. Nowitzki reacted to that by smacking Carlos Delfino for his fifth foul and drawing a technical foul. James Harden hit the free throw and two more to cut the lead to one.

The Rockets finally went in front when Robinson swatted a Shawn Marion drive and then grabbed the rebound of Nowitzki’s missed 3, with Harden erasing the last bit of the Mavericks’ lead with a 3-pointer.