Portugal's president has invited center-right politician Luis Montenegro to form a minority government.
The Democratic Alliance (AD) won a snap election this month, but fell short of gaining a majority in parliament.
The party refused to cooperate with the far-right Chega party, which won a record number of seats.
Portugal, ruled by the Socialist Party since 2015, currently has the most divided parliament since the fall of the dictatorship half a century ago.
President Marcelo Rebelo de Sousa invited Mr. Montenegro to become prime minister shortly after midnight on Thursday after consulting with party leaders.
“Since the Democratic Union won the elections in terms of mandates and votes and approved the Secretary General of the Socialist Party to become leader of the opposition, the President of the Republic has decided to nominate Dr. Luis Montenegro as Prime Minister.” said in a statement released.
AD won 80 seats, far short of the 116 needed for a majority. To pass the bill, the party will need support from either the Socialist Party, which has 78 seats, or Chega, which has 50 seats.
Montenegro's president on Wednesday refused to answer questions about how he would form a majority in parliament before appointing his cabinet.
“All issues related to the exercise of government action will be taken up when the government is present, communicated and explained when the government is present,” he told reporters. “There is not an absolute majority, but a relative majority.”
AD leaders have repeatedly insisted that they will not cooperate with Chega. The party's leader, former soccer commentator Andre Ventura, hopes to serve as a kingmaker in the new parliament.
Montenegro will succeed Antonio Costa, who has led the Iberian Peninsula as leader of the Socialist Party since 2015. But he resigned four months ago amid corruption allegations, even though he was never named as a suspect in the investigation.
Low salaries and rising rents fueled voters' dissatisfaction with center-left rule.