ATHENS, Greece — The Greek government has avoided collapsing over a dispute stemming from Prime Minister Antonis Samaras' move to close the state-owned television broadcaster after a high court ruling offered a way out of a week-long impasse that drew international criticism.

Greece is implementing tough spending cuts, tax hikes and administrative reforms demanded by international creditors who are providing the country with vital rescue loans. But Samaras' conservative ruling party found itself at odds with its governing coalition partners over the decision to close the Hellenic Broadcasting Corp., or ERT.

After more than three hours of talks late Monday, Samaras' center-left minority coalition partners said talks would resume Wednesday on exactly how to keep state broadcasts going until ERT is replaced by a new public entity.

Earlier Monday, the Council of State issued a provisional ruling that the government decree shutting off ERT's signal last week was illegal and ordered its immediate unblocking. But it also said Samaras' administration was within its rights to close the company and axe nearly 2,700 jobs.

Samaras' conservatives had offered to restart programming with a reduced, new staff, while other governing coalition parties had insisted broadcasts should resume immediately. So all three were able to claim a degree of victory.

"The decision effectively agrees with what we said," said Fotis Kouvelis, head of the small Democratic Left junior coalition partner. "That nobody had the right to close the national broadcaster, leaving blank screens in its place."

"We insist that ERT must be operating within a short while, with all its frequencies," until it can be restructured, he told journalists after the talks with Samaras and Evangelos Venizelos, head of the small Socialist PASOK party.

Finance Minister Yiannis Stournaras said broadcasts would be restarted "as soon as possible."

But he added that the government was committed to persevering with its reform program. "On Wednesday (at the new party leaders' meeting), we hope that the necessary agreement emerges," Stournaras said.

Samaras' conservative-led government, formed a year ago to restart punishing economic reforms, keep the debt-stifled country in the eurozone and end months of political chaos, has pledged to cut 15,000 state jobs by 2015.

The ERT layoffs allow it to meet its short-term targets for 2,000 layoffs by the end of this month. But the political storm they caused bode ill for Greece's chances of meeting its overall targets, which are crucial for the continuation of its bailout program.

ERT employees have continued unauthorized live programming since the June 11 closure, backed by the European Broadcasting Union, which represents public TV and radio stations across the continent.

"In a few hours ERT will be broadcasting everywhere, the Council of State has reversed parts of the (decree)," a banner on an Internet broadcast said late Monday.

A government official said Samaras had offered his two partners a summer Cabinet reshuffle and greater influence in ERT's transition.

The dispute rekindled anti-austerity protests, and even led to warnings from within Samaras' own conservative party that the dispute was putting sacrifices made by Greek taxpayers at risk.

Outside parliament, left-wing opposition leader Alexis Tsipras demanded new elections.

"You're done, Mr. Samaras. You have embarrassed the country internationally. ... You are desperate and alone," Tsipras told thousands of supporters at a rally.

Though often seen as too pro-government, ERT is also regarded as a bastion of quality among a quagmire of private channels whose most popular programs are foreign soap operas. ERT's abrupt demise shocked most Greeks and prompted daily protests outside the corporation's Athens headquarters.

European Commission spokesman Olivier Bailly urged Greece's ruling coalition parties to fulfill their responsibilities.

"We have clear positions on Greece and the political stability required for the implementation of reform and the economic rebalancing of the country," he said. "And we would like that stability to be maintained."

In Berlin, German Finance Minister Wolfgang Schaeuble praised the accomplishments made by the coalition government, adding that he had accepted an invitation to visit Athens, without a date being immediately set.

Samaras, 62, has been credited with rescuing Greece's membership in the group of nations that use the euro currency by sticking to harsh austerity measures imposed by rescue lenders. The country has depended on rescue loans from its European partners and the International Monetary Fund since May 2010.