Jakov Puljic and Mario Gavranovic scored the goals as Rijecka handed AC Milan a first defeat in this season's Europa League.
Gennaro Gattuso suffered defeat in his first Europa League game in charge as AC Milan rounded out an otherwise successful Group D campaign with a 2-0 loss away to Rijecka.
The Rossoneri's unbeaten record in Europe this season came to a disappointing end in Croatia, leaving their new manager still waiting for his first victory since taking over from Vincenzo Montella.
Denied at the death by Benevento goalkeeper Alberto Brignoli's unlikely equaliser on Sunday, Gattuso saw a much-changed XI out-fought and out-thought by a side with nothing to play for but pride.
Jakov Puljic's sumptuous free-kick beyond stand-in goalkeeper Marco Storari gave Rijecka the lead after just seven minutes.
Mario Gavranovic's first-time finish from a left-wing cross confirmed a famous win for the hosts, meaning Milan have now triumphed in just four of their last 15 outings in all competitions
While already certain of qualifying for the knockout stages as group winners, Gattuso had called for his players to show "desire" in his pre-match press conference, aware of the need to arrest a worrying run of form.
Yet his inspiring words appeared to fall on deaf ears judging by his side's first-half display, even when taking into consideration the absence of several first-team regulars.
Sluggish from the outset, they fell behind in the seventh minute when Lucas Biglia's foul just outside the area allowed Puljic to curl a free-kick over the wall and beyond Marco Storari's desperate dive.
The scorer missed an excellent chance to heap further misery on the visitors before the break too, heading a teasing cross from the right narrowly wide of the target.
Milan created little yet still could easily have drawn level before half-time, with Andre Silva's lob clearing goalkeeper Simon Sluga but ending up sitting on the roof of the net, rather than in the back of it.
Rijecka moved further clear just two minutes into the second half, Gavranovic's rather scruffy finish from Zoran Kvrzic's low delivery doubling their advantage.
Conceding for a second time seemed to briefly bring Milan to life as an attacking force, with Luca Antonelli seeing an on-target effort blocked by a home defender.
Patrick Cutrone wasted their best chance to half the deficit though, the forward seeing a downward header loop over after he'd misjudged his jump to meet Davide Calabria's tantalising cross.
To round out a thoroughly miserable road trip for Gattuso, a late booking picked up by Manuel Locatelli means the midfielder will be suspended for the next game in Europe.