It started just after 2am when tweets on topics including immigration, tax increases and rape were sent from the Social Democrats' official Twitter account.
The hijackers also manipulated the party's symbol by adding a Bitcoin logo to it and briefly changed the account's name to the “Bitcoin Democrats”.
They tweeted – among other things – that cannabis had been legalized, that Prime Minister Stefan Löfven would resign and that the Swedish currency had been replaced with Bitcoin.
Tweets also included the more sinister “1 like = 1 dead Muslim”.
The Social Democrats said at around 9.30am that they had managed to regain control of the account and had taken down the tweets, after reporting it to Twitter and the Swedish police.
It was not immediately known who had sent out the strange tweets.
“We will start by investigating what kind of intrusion we're talking about,” the Social Democrats' election officer John Zanchi told Swedish news agency TT.