The co-hosts had been faultless in the Group Stage, beating Netherlands and Georgia before gaining a vital 33-25 win over Croatia to not only top Group E, but also carry two points and a healthy goal difference into the Main Round.
But Slovenia - who won three from three in Group D - were not going to be as easy to roll over as their neighbours; goals from Domen Makuc and Borut Mackovsek played their role in silencing the home crowd before Hampus Wanne finally got Sweden on the board in the fourth minute.
However, his teammates were struggling to break through the strong Slovenian defence, and that remained the Swedes' only goal of the first eight minutes, as Slovenia opened a 4-1 advantage.
Despite a period of over four minutes without a goal approaching the midpoint in the half - in which the goalkeepers Andreas Palicka and Joze Baznik were on top - it was Sweden who were chipping away at the score more often, as Wanne scored again to reduce the gap to one, at 5-4.
The volume in the Malmo Arena turned up again soon after, when Palicka made a brilliant leg save from Blaz Janc, before a fast-break ended with Wanne levelling the scores at 6-6, only for Domen Novak and Janc to immediately hit back and restore the visitors' two-goal lead.
The next 10 goals of the match were not only evenly shared, but Sweden cut the gap to one goal five times, and five times Slovenia re-established a two-goal advantage. The trend was finally ended in the final four minutes of the half, when Makuc squeezed a 9m effort past Palicka to make it 14-11.
But Sweden had the final say of the first 30 minutes, and again they turned to Wanne to score in the final seconds to make it 15-13 to Slovenia at half-time.
Head coach Michael Apelgren chose to bring in goalkeeper Mikael Appelgren and line player Oscar Bergendahl for the start of the second half, and those decisions were instantly vindicated as Bergendahl scored twice and Appelgren made a key save from Janc, as Sweden began with a 4-0 run which gave them the lead for the first time.
Slovenia finally scored nearly six minutes into the second half, but Daniel Pettersson and Albin Lagergren kept the score ticking over, forcing Uros Zorman to use a time-out when 19-17 down. However, the effect was limited, as Bergendahl scored again to give Sweden their first three-goal lead at 21-18, before a Nikola Roganovic penalty extended the lead to four.
All that good work almost came undone as three Makuc strikes in succession took the Balkan side on a 3-0 run to make it a one-goal game 24-23, only for Sandell to step up and reduce the pressure, scoring the first of a 4-2 run in Blagult's favour.
The final 10 minutes saw Slovenia fail to made real inroads into the margin, as Felix Claar, Bergendahl and Sandell improved their personal goal tallies, before an Eric Johansson rocket closed out a superb second half from the record champions, sealing a 35-31 victory.
Sandell's seven goals was enough for him to top the Swedish charts and take the Player of the Match award, though Makuc's eight goals made him the game's top scorer.
Sweden are now clear at the top of Main Round Group 2 on four points, two more than Slovenia, Iceland and Croatia, with Hungary and Switzerland on a point apiece.
Sweden will look to make it four wins from four in EHF EURO 2026 and take another step towards the semi-finals on Sunday, when they take on Iceland. Slovenia will be aiming to bounce back against Hungary.
