The Celtics have made a habit of taking whatever little the Nets have. They have the Nets’ draft picks, of course, but on Friday night, in an arena full of green shirts — some celebrating St. Patrick’s Day, most celebrating Isaiah Thomas — it was more than that.

They took the Nets’ cheers, they took their momentum and they took their chance at finally — finally! — winning back-to-back games.

A night after a rousing win over the Knicks, the Nets fell to the Celtics, 98-95, at Barclays Center. The Celtics won despite appearing to play at half speed for half the game and were without Thomas, who was out with a knee bruise.

The Nets, meanwhile, crawled back from hole after hole before eventually falling on three three-point attempts that refused to drop in the final seconds. They are an NBA-worst 13-55, but they produced a strong defensive showing and continued signs of improvement from a core group that finally is getting to play together.

Randy Foye hit a layup with 10.4 seconds left to draw the Nets within two, but Avery Bradley hit one of two free throws to set off a wild finish in which Brook Lopez, Quincy Acy and Foye all attempted to tie it (Foye’s shot came after time was up).

“I was confident in it,” Lopez said of his attempt. “It felt good. I thought it was going in. They took away our first option so I just tried to make myself available. We fought until literally the very end.”

advertisement | advertise on newsday

Boston’s Jae Crowder had 24 points. Lopez scored 23, Foye had 14 and Jeremy Lin added 10 points, seven rebounds and six assists for the Nets.

Though it was a bumpy road for Boston, Crowder’s pull-up three-pointer with a little less than four minutes left broke a tie at 85 and gave the Celtics the lead for good. He had a dunk with 2:52 left and completed the three-point play to make it 91-85.

The Nets, outmatched on paper and on the court, made a valiant effort in the second half, both in the opening minutes of the third quarter and down the stretch in the fourth.

They fell behind by 10 with 2:57 left in the third after taking a short-lived lead at the beginning of that quarter on the force of a 12-3 run.

Then they hit three three-pointers in the first minute and a half of the fourth quarter — one apiece from Foye, Andrew Nicholson and Acy, who gave the Nets a 74-71 lead and did a little celebratory jig as the Celtics called a timeout.

Brooklyn Nets videos

The Nets shot only 27.9 percent in the first half but trailed only 45-37 on the strength of their defense.

“I thought we did a good job executing,” coach Kenny Atkinson said. “Credit to them, they hit some big shots down at the end . . . but the positive I take is that we’re learning to play when shots aren’t falling for us. That’s important. In the first half, we couldn’t throw it in the ocean, but we kept defending, kept defending.”

Not even the Celtics could take that away from them, and for one night, it was almost enough.