Monta Ellis figured the Milwaukee Bucks’ fans would boo him every time he touched the ball Saturday night at the Bradley Center.

And he figured right.

But Ellis was able to ultimately get the last laugh as the Dallas Mavericks gritted out a 91-83 victory over the Bucks and claimed their first road win of the season.

In ending this three-game road trip 1-2, the Mavs (4-3) host Washington on Tuesday before hitting the road again to play in Miami on Friday.

After scoring 18 points and handing out five assists while enduring the wrath of many of the 16,448 fans on hand, Ellis said the boos didn’t bother him.

“It is what it is — it comes with it,” said Ellis, who played the last 1 1/2 years with the Bucks. “When I played here I played the same way, played hard, went out there every night.

“It’s just how fans are. When I left this organization, everybody in this organization knew that Monta Ellis played every night, every minute, and he played hard, so that’s all that matters to me.”

Ellis said he never tried to get caught up in a personal duel with Bucks guard O.J. Mayo, who played last season for the Bucks and essentially traded places with Ellis over the summer via free agency.

Meanwhile, the Mavs, who were playing their fourth game in five nights, darted out to a 19-point lead in the third period, then had to hold off a hard charge by the Mayo-led Bucks.

“It wasn’t pretty,” said Dirk Nowitzki, who finished with 16 points and six rebounds. “I thought we played with a lot of energy in the first half.

“We knew they were going to make a run at us in the second half and throw everything at us, and they did. I think we got a little tired. But you’ve got to give us credit, we hung in there.”

The Bucks rallied to within 81-79 when Mayo hit a 3-pointer directly in front of the Dallas bench, then turned and stared at the bench as he was going back down the court.

Shortly thereafter, Samuel Dalembert, another Bucks castoff from a year ago, scored inside for an 85-81 lead for Dallas. Then following a Mayo turnover, Nowitzki fired in a jumper and Ellis made two free throws and the Mavs were suddenly nursing an 89-82 lead with 1:14 to go.

Coach Rick Carlisle talked about two momentum plays earlier in the Mavs’ standoff.