Stefan Löfven has led the Social Democrats to the brink of power. Now he wants a deal with unions, bosses ... and Ed Miliband

Stefan Löfven is an unlikely candidate to have taken Sweden's Social Democratic party out of the depth of crisis and back to the brink of power.

Until 18 months ago, he had hardly spent any time at the party's parliamentary headquarters in Stockholm's old town. He had built his career as the leader of IF Metall, one of the country's most powerful unions, before being picked as leader in a meeting held behind closed doors last January, as the party's support hit record lows.

It is the first time in its 124-year history that the Social Democrats have had a union boss as leader. In a remarkably short time, Löfven, a former welder with a stocky frame and a doughy,boxer's face, has taken the party to an eight-point lead over the ruling centre-right Moderates. A poll this month revealed that a majority of Swedes believe Löfven will be prime minister after next year's election.

"We definitely have a good chance," Löfven said when I met him in his offices, already deserted for the summer break. "The government is weak, they're tired, and we have been very focused and very determined."

Löfven, 55, had already made himself comfortable. On the windowsill, a framed photograph showed him standing behind Olof Palme, the Social Democrat prime minister assassinated in 1986.

Löfven's campaign has focused remorselesslyon jobs and education, but he clearly wants to be an internationalist in Palme's mould. "In Sweden we created a win-win-win situation on how to make companies profitable and strong at the same time as employees and society benefit," he argues. "We used to be able to handle that on a national level. We can't do that any more." The solution, for him, is a "global deal" between business and labour. "We have to build alliances," he argues. "That's why I'm interested in the alliance with Ed Miliband."

Löfven comes from a small northern industrial town and boasts of his love for Bruce Springsteen, Tottenham Hotspur and ice hockey, so it's hard to see him as a natural partner for a man of Ed Miliband's London intellectual background. But he has met the Labour leader four times in a little over a year, and in February he was his host during a two-day fact-finding visit to Sweden.

"I like him," Löfven said. "We see things similarly, in that it's all about jobs, jobs and education. And of course we're in the same position – being in opposition and having to get into power."

Oscar Stenström, Löfven's foreign policy adviser, joked: "We never got him into the sauna. He rejected it, politely."

Löfven sees eye to eye with Miliband on the tough welfare-to-work policies the coalition has introduced in Britain: "The conservatives, what they want us to believe is that people who are unemployed, who are sick, do not want to work, and that they can sit at home doing nothing."

The reason Sweden is such a successful industrial nation, he said, is precisely because it has never taken this hardline approach. "Employees have to understand that they need to change constantly," he explained. "But how do you make an individual want to change? You do it by creating stability and confidence: if I know that I can lose my job and survive, I'm more willing to see through that change."

That's why he doesn't blame union intransigence for the decline of British industry. "I will not sit here and judge, and say the British trade unions were not good enough at handling the situation," he said. "Did they feel security in a changing society?"

Nevertheless, Löfven has little in common with the UK's more bellicose union heavyweights. IF Metall, which Löfven headed for 12 years, is the most co-operative of Sweden's unions, and as leader Löfven was closer to the company owners than most. As well as fighting for workers' rights, he lobbied internationally, helping Saab sell Gripen fighter jets to South Africa, or getting Brazil's metalworkers union to back Gripen over Dassault of France.

In the car industry, he helped in negotiations over Ford's takeover of Volvo and GM's of Saab. "We knew we needed the investment," he said of the sell-offs. "We needed capital, and if Swedish companies cannot give you that, you need to make sure that others can."

Along the way, he has become so close to the Wallenberg family, Saab's largest shareholder and Sweden's most powerful industrial family, that Jacob Wallenberg took him along to this year's meeting of the Bilderberg Group, the closed meeting of international politicians and businessmen.

Löfven is pragmatic about the role of profit-making companies in education, social care and health in Sweden, proposing tighter regulation rather than bringing their operations back under direct government control. "It's more important to deliver quality than it is who runs it," he said. "Quality is the most important thing."

More recently he has been accused of pandering to the anti-immigrant vote, proposing to reverse the loosening of labour immigration rules brought in by the centre-right government. But he bridles at the suggestion that all this puts him on the right of his party. "I've never really understood what people mean by left and right. To me it's very leftwing to make sure people have jobs. It's the same as when you discuss the economy and say, 'I want to stick to stable public finances', and they say, 'you're rightwing', and I say 'no, that's leftwing, because that's the only way you can deliver welfare to the people'. You can't do that if the economy is bad."

Faced with the fiscal problems the UK faces today, Löfven, too, would make cuts, just as his predecessor Göran Persson had to do in the mid-1990s, when Sweden, like the UK today, faced debt-to-GDP levels of more than 80%.

"We had to make sure, not least for the markets, that at some point we were going to reach a situation where the debt was under control," he says.

Not that he would mirror the British coalition's approach. "I see Labour's point that you need also to invest," he said. Persson, he notes, poured money into professional training and university courses. "Almost a million people got a chance to raise their education, which was very good, because when things started to go well, people were on a higher level."

Löfven is adamant that he had no prior ambitions to lead the party. "No, no no. I regarded myself very very lucky to have the position I had, as a trade union leader. I was very happy with that and that was what I thought I was going to do until the day I retired."

He has been drawn to politics since he was young. "I remember very clearly when Robert Kennedy was killed. He symbolised something to me even though I was only 11 years old, and just a few years after that I became active in the party's youth organisation, mainly because of Olof Palme." The link with Palme is something Löfven's campaign team wants to emphasise. His aides draw attention to the framed photograph, taken when the then prime minister visited Hägglunds, the tank manufacturer where Löfven was then union representative.

Palme, Löfven remembers, stopped to chat to the workers, to the frustration of the chief executive. "I said to him afterwards that it was good that he had taken the time, and he said to me something like, 'Sometimes you have to keep those CEO's on a short leash'," Löfven laughs.

So if Löfven does become prime minister next year, he looks set to pursue the old internationalist dream of a "global deal" on employment rights.

"Look at what happened in Bangladesh," he said. "We are buying clothes from a place that needs labour, but not the kind of labour where you can be killed in one collapse because the building was too bad: that shows that workers all over the world need to have the ability to form a trade union and bargain collectively."

It's in this battle that he intends to learn from Palme. "He showed us that a man from a very small country could make a difference in the world. That's something I want to renew right now: that we can make a difference."