Lofven already had the backing of the Centre Party, Liberals and Greens after an historic agreement bringing together the centre-right and centre-left, but the Left Party had threatened to scupper his chances as prime minister without a guarantee it would have a voice in policy.
"We now have the possibility to draw a line under four months of political uncertainty in Sweden and put in place a strong government which is not dependent on the Sweden Democrats," Stefan Lofven told reporters.
September's election delivered a hung parliament with neither major bloc able to rule without the support of the anti-immigration Sweden Democrats, a party with roots in the white-supremacist fringe and who hold the balance of power.
The deal with the Centre, Liberals and Greens is based on Lofven, a former union representative, delivering tax cuts and driving a sharp swing to the right in Swedish politics.
But it remained unclear whether he would be able to deliver.
Sjostedt said his party would call for a vote of no confidence in Lofven if he proposed bills to deregulate the labour and rental markets, which are part of the agreement between the Social Democrats, Centre, Liberals and Green parties.
"We are going to fight every measure that pushes Sweden to the right," Sjostedt told reporters.
"It is we who hold the balance of power in this parliament."
GRAPHIC - Election scenarios: https://tmsnrt.rs/2p45tJh (Reporting by Stockholm Newsroom; editing by Niklas Pollard and Angus MacSwan)