Marcus Derrickson’s winning three-pointer capped his 22-point, 18-rebound game. (Pablo Martinez Monsivais/AP)

Georgetown forward Marcus Derrickson had only one thought when Seton Hall blocked his three-point attempt with 39 seconds left, then took the carom in for a tying layup.

“I just wanted to make it up,” Derrickson said.

Did he ever, and he didn’t have to wait long to do so.

Derrickson drilled a deep three-pointer while absorbing a foul with 4.5 seconds remaining, helping to secure an 83-80 victory over Seton Hall on Saturday before 11,037 at Capital One Arena. Derrickson finished with 22 points and a career-high 18 rebounds, the most for a Hoyas player since Bradley Hayes had 18 against UNC Asheville on Dec. 19, 2015.

Freshman Jamorko Pickett added 18 points for Georgetown (14-10, 4-9 Big East) , which snapped a four-game slide and beat the Pirates (17-8, 6-6) for the first time in six tries.

It wasn’t easy, even if Georgetown’s offense zipped along at a high level much of the afternoon. The Hoyas led by 17 points early in the second half, saw Seton Hall rally to briefly take the lead and then barely avoided overtime in the closing seconds.

Seton Hall rebounded Derrickson’s free throw after the go-ahead score and called timeout. Desi Rodriguez (game-high 24 points) floated an inbound pass to Angel Delgado, who flipped it back to Rodriguez, who then passed to Myles Powell. The sophomore faked, moved over a step and then missed a good look on his attempt to tie it at the buzzer.

It was a step forward for Georgetown, which has already lost four times after building double-digit leads in Coach Patrick Ewing’s first season. The Hoyas’ slide began when they fell by a point to DePaul on Jan. 24; they also dropped an overtime decision to Xavier on Feb. 3 and saw Providence score the final nine points in a 73-69 triumph Tuesday.

“We played a great game today,” Ewing said. “It shouldn’t have been as close as it came down to, but that’s how it’s been for us this year.”

Ewing said he has received calls and texts of encouragement from other coaches over the last month, noting that Georgetown is getting better and getting close. Given the success he has enjoyed in the sport as a player, Ewing chuckled at the thought of coming close. It isn’t the same as winning.

The Hoyas seemed determined to avoid anything close Saturday, scorching the Pirates for 1.28 points per possession while building a 46-33 halftime lead. In the first minute after the break, Georgetown had two baskets and Seton Hall committed two turnovers.

The Pirates, though, quickly carved their deficit to single digits and never let the Hoyas get too far away. They took their first lead of the day on a Delgado layup to make it 69-67, only for the Hoyas’ Trey Dickerson to make two free throws on the next possession. When Powell gave Seton Hall its second lead on a three-pointer to make it 72-71, Pickett connected from behind the arc 17 seconds later.

The Pirates wouldn’t get a third lead.

“We didn’t let it rattle us,” Derrickson said. “We ran our stuff. Jamorko stepped up and made some big shots for us and helped us withstand the run, and then we just closed out the game.”

Derrickson played his part, delivering a double-double by halftime (14 points and 10 rebounds) to provide needed cushion before taking Georgetown’s final two shots.

“He’s been playing great for us,” Ewing said. “He’s stepped up, not only offensively but defensively. He kind of took a step back against Providence, for whatever reason. That was an off day for him. He decided to call in sick or something, but he bounced back today.”

Not just from a forgettable nine-point outing Tuesday, but a frustrating blocked shot that left Seton Hall flirting with overtime before Derrickson floated out beyond the top of the key to knock down Jagan Mosely’s feed from the right wing.

“I just like this moment,” Derrickson said. “There’s something about it. I just like the last shot.”

On Saturday, so did Georgetown.