His center-right party was part of the opposition bloc that secured a parliamentary majority, with the anti-immigration Danish People's Party now the second-largest group in parliament.