BERLIN — German Chancellor Angela Merkel's conservative Union bloc and the center-left Social Democrats remained locked in talks early Friday in an effort to determine whether they can enter into formal negotiations over a future government.

Party leaders worked through the night to sound out ways of removing the differences that would allow them to renew the "grand coalition" that's governed Germany for the past four years.

Early Thursday, Merkel had expressed optimism about a deal, telling reporters in Berlin that "large obstacles" remained but she intended to push for new compromises.

"The people expect us to find solutions," she said.

Following a dismal result in Germany's Sept. 24 election, the Social Democrats initially vowed not to enter into another government with Merkel's conservatives, but reconsidered their position after the long-time chancellor's attempts to form a coalition with two smaller parties collapsed.

Germany President Frank-Walter Steinmeier appealed to the negotiators Thursday to consider their responsibility toward Europe, not just their own parties and political futures.

Closed-door talks this week have centered on whether the parties can find the basis to open formal negotiations on a coalition agreement to form a new government.

Should the Social Democrats and Merkel's Christian Democratic Union and Bavarian-only Christian Social Union not be able to form a coalition, the only other paths ahead would be a Merkel-led minority government or fresh elections.

Social Democratic leader Martin Schulz told reporters ahead of the final round of talks that they had already made progress and found common ground on "many points." However, Schulz, a former president of the European Parliament, said any new government needed to "strengthen Europe."

"What we need in Europe is the same as what we need on a national level, we need ... more cohesion," he said.

Germany currently has a caretaker government, limiting Merkel's ability to launch major initiatives at a time when French President Emmanuel Macron has pressed for ambitious reforms in the European Union.

The final round of talks focused on thorny issues such as Germany's migration policy, health care and public finances.

Even if the two sides decide they have the basis for coalition talks, such negotiations would require the approval of a Social Democrat congress on Jan. 21, and the party's leadership will have to overcome strong reservations among members.