Andraz Sporar scored his first World Cup qualifying goal to keep Slovenian hopes alive after a 4-0 win at Malta.
The Boro striker scored five minutes into the second half to put Slovenia 2-0 up after Josep Ilicic had given them a first half advantage.
Ilicic added a third goal before Sporar was replaced by Salzburg's Benjamin Sesko on the hour. Sesko netted Slovenia's fourth goal.
The win moved Slovenia back up to third in the group - six points behind leading duo Croatia and Russia with three games still to play.
Slovenia now take on Russia in Ljubljana on Monday in what will be a decisive fixture.