BOSTON — The job title on Marcus Smart’s tax return reads “professional basketball player,” but, in point of fact, the Boston Celtics pay him to be a pain in his opponent’s posterior.

And Thursday night when it mattered most, Smart was an All-Star caliber, max-contract annoyance.

With the Celtics having shaved a 26-point deficit against Houston to one, he drew an offensive foul on Houston’s James Harden with 7.3 seconds left. Then after Al Horford scored to give Boston its first lead of the game with 3.9 seconds left, Smart got last season’s runner-up in MVP voting to do an encore.

It was strange that it happened once. It was inconceivable that it happened twice. But it was pure Marcus Smart.

When the aliens land and ask you to describe Smart’s game, take out your phone and show them these two plays.

“Those two charges were huge,” said Smart after the 99-98 triumph. “I was just in the right spot at the right time.”

But it was more than that, of course. Smart was in contact with Harden as the Rockets were trying to inbound the ball, letting the Rocket get a sense of just what it’s like to ride the Green Line trolley during rush hour. When Harden extended his arms to move him away, Smart extracted the call.

After Horford’s bucket, Smart repeated the act on the other side of the lane. Harden was already annoyed with Smart before the ball got to the inbounder, and the Celtic sold the call when Harden moved into him and brought up his right arm.

“First of all, I wonder how you only have two officials on a national TV game,” said Harden, referencing the absence of official Mark Lindsay, who was unable to work because of a back problem. “That’s the first question. But a lot of grabbing, a lot of holding. How else am I supposed to get open? The guy has two arms wrapped around my whole body.”

That’s not quite how Smart saw it, but he wasn’t exactly pleading total innocence in the give and take.

“The first one, we were just trying to deny him the ball,” said Smart, who also contributed 13 points, including a key layup in the last minute. “We were just trying to make it real uncomfortable for him the whole night.

“He lost it and gave me a little nudge, and it was kind of right in front of the official, so he called it. Then Al scores it, and they were getting ready to take the ball out and he’s bumping me chest to chest. I’m just standing there in the spot just getting ready to play defense again. My hands are up, and then once again he does the same thing.

“He loses it again, and the ref was right there again and called it.”

Part of it had to be Harden’s displeasure with Smart’s proximity, but another slice was his out-of-character shooting. Harden had 34 points, but 15 of them came at the free throw line while he was 7 for 27 from the floor.

“I think a lot of it was frustration,” said Smart. “You know, he’s a great player, and I think somebody said he went 3 for 17 in the second half. He’s trying to do everything to will his team, and we were making great plays in the second half, and it does get frustrating. And, like I said, he just lost it.”

And Smart did a fair job of getting under Harden’s skin in those situations.

“If that’s what we want to call it, I probably did,” he said. “I mean, I was just trying to do everything I could to help my team, and that was just bring energy. My shot wasn’t falling. I got to the rim a little bit, but mostly it was just on the defensive end for me.”

As for what can be done against the NBA’s leading scorer (32.4 per game coming in), a task taken on by a number of Celtics, Smart said, “Just get up in him. I know it’s probably crazy to say with a guy his caliber, but, you know, when he can get to dancing and he feels comfortable, I think that’s with anybody, they’re really tough to guard. But when you get up in him and you kind of give him one way to go and one option to go, it’s hard and it becomes frustrating.”

Especially when going against someone like Smart, who laughed when asked about being that burn in the backside.

“I guess you could say that,” he said. “My mom might say that. But, no, you know, I play defense with passion, and defense wins games. And that was proven tonight.”