Merkel arrives for party meeting with CDU
The SPD won 25.7% of the vote, ahead of 24.1% for Merkel's CDU/CSU conservative bloc, according to provisional results.
Agreeing a new coalition could take months, and will likely involve the smaller Greens and liberal Free Democrats (FDP).
The Greens came in at 14.8% and the FDP were on 11.5%.
Merkel, who did not seek a fifth term as chancellor, will stay on in a caretaker role during the coalition negotiations that will set the future course of Europe's largest economy.