The country's centre-left bloc retained power despite a strong showing from the anti-immigration Progress Party.