HAMMOND — Down to its final out, Louisiana-Lafayette got exactly what it needed.

Chase Compton connected on a two-run homer with two outs in the ninth niing Tuesday as the No. 2-ranked Ragin’ Cajuns rallied for a 6-5 win over Southeastern Louisiana at Alumni Field.

Southeastern (27-18) entered the ninth with a 5-4 lead following a three-run rally of its own in the eighth.

Trailing 4-2 in the eighth, Brett Hoffman doubled down the left-field line with one out to jump-start the offense. Earlier, Hoffman led off the sixth with the first home run of his career, a solo shot to right.

Daniel Midyett followed up Hoffman’s extra-base hit with a single up the middle, putting runners on the corners. Sam Roberson, who was 0-for-3 at the time, singled to right on a hit-and-run, driving in Hoffman and sending Midyett around to third base.

The Lions tied the score on a delayed double steal with Midyett swiping home as UL-Lafayette tried to nab Roberson at second. Kyle Cedotal kept the inning rolling with Southeastern’s fourth consecutive hit, a single over the outstretched glove of second baseman Jace Conrad, putting runners on the corners once again. Kennon Menard gave the Lions the lead with a groundout to second, scoring Roberson.

The Cajuns (40-6) took advantage of a Lion error to start the ninth. Seth Harrison, leading off the inning, reached on a misplayed ball by second baseman Brooks Morse. Though eventually erased on a fielder’s choice, the error kept the inning alive for Compton’s two-out homer down the right-field line off Dylan Hills (3-3).

In the bottom of the ninth, Southeastern refused to go quietly. Jacob Seward drew a walk from reliever Ryan Wilson to lead off the inning, then moved up to second on a wild pitch. Andrew Godbold drew a one-out walk, putting the potential winning run aboard, but Hoffman grounded into a double play to end the game.

UL-Lafayette reliever Greg Milhorn (5-2) earned the win despite surrendering the lead in the eighth, and Wilson earned his fourth save of the season with a scoreless ninth.

Southeastern has dropped five consecutive games for the first time since the 2007 season.

UL-Lafayette is tentatively scheduled to give freshman right-hander Reagan Bazar (3-0, 1.80) the first career start when the teams meet again at 6 p.m. Wednesday at M.L. “Tigue” Moore Field in Lafayette.

Southeastern will counter with sophomore right-hander Gabe Von Rosenberg (1-0, 3.60).