A defeat to Kalmar and draw with AIK had somewhat derailed Elfsborg's strong start, while Brommapojkarna had been the model of inconsistency so far with two wins, two draws and two defeats, but came into this on the back of an away with at Halmstad.
The opening 15 minutes did not suggest BP were going to leave with nothing, as Kevin Ackermann brought out a fine save from Isak Pettersson, before Oliver Berg blazed over from a great position.
The away side continued to have the better of the first-half chances - 10 minutes before the break, Pettersson did well to tip a looping David Isso header over the crossbar. In the second half, the hosts made them pay for their lack of cutting edge.
The deadlock was broken 18 minutes from time when Julius Magnusson's inswinging corner was headed down and in by Ostman for his first goal since August.
Having waited so long for a goal, the 20-year-old only had to wait another 21 minutes for another, as he peeled away from his marker to run onto a Arber Zeneli through ball, and then slotted it past Leo Cavallius in style.
Victory takes Elfsborg above Hammarby and into second, two points behind leaders Sirius with a full programme of Allsvenskan fixtures to come this weekend. The Bromma Boys sit 10th and are one of four teams on eight points.
