Portugal's center-right government won an election that was a test of its tough austerity stance, but its failure to win a majority in parliament raises the prospect of political uncertainty.
Prime Minister Pedro Passos Coelho would be the first leader in Europe to be re-elected after imposing hardships on voters under international bailout packages that followed the start of the sovereign debt crisis in 2009.
Yet a minority government could unnerve investors in the Iberian country of 10 million. Not one minority administration has survived a full term in Portugal since the 1974 overthrow of the fascist regime installed by dictator Antonio Salazar.
With 99.1 percent of parishes in the country counted, the ruling coalition had around 38.5 percent of the vote while Socialist challenger Antonio Costa had 32.4 percent. The final count will not be available until late on Monday.
Passos Coelho said he was ready to form a new government but suggested he may to have to compromise on policies.
"We interpret the results with a lot of humility," he said. "We failed to reach a majority in parliament."
The results showed the government with just 100 seats in the 230-seat parliament - well short of the 116 it would need for a majority - although the tally could rise slightly with the final result.
Costa, who has promised to ease austerity and deliver more disposable income back to families, said his party had failed to meet its goal of victory but he would not resign and the Socialists would stick to their policies.
"Nobody can count on the Socialists to support policies that go against the Socialists," he said. "There was a large majority of Portuguese who voted for change."
The small Left Bloc increased its share to about 10 percent of the vote, while traditional Communists obtained 8.2 percent.
Antonio Barroso, senior vice president at the Teneo Intelligence consultancy in London, said political instability was set to rise.
"The good result of the extreme-left Left Bloc will force the Socialists to harden their stance towards the government, which does not bode well for political stability over the medium term," Barroso said in a research note.
The first hurdles could come with the presentation of the 2016 budget in coming weeks.
Passos Coelho's coalition raised taxes while cutting public spending, but argued during the campaign that the country was now finally beginning to see the fruit of the measures with a gradual return to growth after three years of recession.
The general election was the first since Portugal exited an international bailout last year. Victory for the government was unthinkable just a few months ago with polls giving a solid lead to Socialists who promised to ease back on austerity and give more disposable income back to families.
It comes amid signs that voters elsewhere in Europe appear resigned to austerity. In Greece, voters gave Alexis Tsipras a new mandate last month to implement tough measures he had once rejected; and in Spain, Prime Minister
Mariano Rajoy's People's Party leads polls before a Dec. 20 election.
Nicholas Spiro of Spiro Sovereign Strategy said the election underlined the weakness of the Socialist Party (PS) challenge in a country where unemployment remains high at 12.4 percent and many Portuguese have felt no benefit from the fledgling recovery.
"This election was a defeat for the PS more than anything else," he said.
President Anibal Cavaco Silva will have the task of naming the next prime minister after talking with all political leaders, which he is expected to start in coming days.
The constitution does not specify how the president should pick the winner, whether by the number of votes or the number of lawmakers elected to parliament. The son of a country doctor who grew up in Angola, Passos Coelho has once acknowledged that he wanted "to go beyond the Troika", that is demands by Lisbon's bailout creditors, to swiftly reconquer investor confidence.
Portugal's economy returned to slow growth last year after a three-year recession and is now expanding by 1.6 percent. Going into the election, investors were broadly confident that Lisbon would pursue its reforms. Portuguese bond yields held just above seven-week lows on Friday.