NEW YORK — Joel Hernandez scored a career-best 27 points, grabbed a season-high 10 rebounds, and made a free throw with a second left to give LIU Brooklyn a 79-78 victory over Hartford on Thursday night.

Jashaun Agosto’s free throw gave LIU Brooklyn (3-6) a 78-75 lead before Hartford’s Travis Weatherington tied it 78-78 with a 3-pointer with five seconds remaining. Hernandez made the first of three free-throw attempts to end it.

Hernandez was 10-of-19 shooting from the floor and made 6 of 12 free throws. Julian Batts added 17 points and Agosto had 14 for LIU Brooklyn, which snapped a three-game losing streak.

Jason Dunne had 19 points to lead Hartford (3-5). John Carroll had 18 points and Weatherington chipped in 15.

The Blackbirds led 74-65 with 2:35 to play. Carroll scored six points, Dunne made a 3-pointer, and Hassan Attia split a pair of free throws with 19 seconds left to pull Hartford to 77-75 with 19 seconds remaining.