MOSCOW - Ukraine's increasingly bloody conflict went on hold Friday, after the government and pro-Russian rebels signed a cease-fire deal that at least temporarily solidified the insurgents' territorial gains.

The agreement, made with the Kremlin's endorsement, appeared to be a first step toward the type of dormant conflict that Russia has exploited to exert control over former satellites in the decades since the collapse of the Soviet Union, including thwarting their chances of joining the NATO defense alliance.

With rebels making swift gains across eastern Ukraine this week, and preparing to seize the key industrial port city of Mariupol, it seemed that Ukrainian authorities felt they had little choice but to push for a halt to hostilities. The rebels turned the tide of battle early last week after receiving heavy backing from Russian forces, Kiev and its Western allies say. The Kremlin denies aiding the rebels.

The cease-fire deal was made as leaders of NATO countries gathered in Wales this week for discussions focused on the conflict. The terms of the deal underscored Russia's apparent willingness to commit far more resources than the West to achieve its aims in Ukraine. Kiev has asked for Western military aid, but relatively little has been forthcoming, in part because of Western caution about getting pulled into a proxy military conflict with Russia inside a non-NATO-member nation.

In Wales, Ukrainian President Petro Poroshenko told reporters that he welcomed the deal, and he offered political concessions to the eastern regions that would significantly increase their autonomy and would guarantee their ability to use the Russian language, key demands when the fighting started in mid-April.

"We are really doing our best to keep peace and stability in the eastern part of Ukraine," Poroshenko said. "This is a very important challenge, not only for Ukraine, not only for the region. For the whole world."

Poroshenko said he was satisfied that the deal respects Ukraine's sovereignty and territorial integrity. He said the terms were based on a conversation he and Russian President Vladimir Putin had earlier this week.

Although leaders ranging from Poroshenko to President Obama voiced skepticism about how long the break in hostilities could hold, fighting mostly quieted in eastern Ukraine on Friday evening as both sides for now put down their arms, witnesses said.

Envoys in Minsk said that they planned to swap all the prisoners they had taken beginning as early as Saturday, freeing more than 1,000 people on each side.

As part of the deal, heavy weaponry is also supposed to be pulled back from the combat zone and humanitarian corridors will be set up to facilitate international aid deliveries. The full text of the 12-point agreement was not immediately released, and the envoys, who included representatives from Ukraine, Russia, the rebels and the Organization for Security and Cooperation in Europe, said they would continue discussions next week.

But with rebel leaders saying in Minsk that they still desired full independence from the rest of Ukraine, it remained unclear how long the cease-fire could hold.

The deal "does not mean that the path for secession will change somehow," a rebel leader, Igor Plotnitsky, told reporters in Minsk, in remarks that were broadcast on Russian state television.

Any deal that gives major concessions to the rebels is already bitter tonic to the pro-Kiev supporters of Ukraine's current leadership. Losing Ukraine's eastern industrial heartland would probably spark renewed protests in Kiev, more than six months after pro-European demonstrations toppled President Viktor Yanukovych. That unleashed first Russia's annexation of the Crimean Peninsula and then the violence in the east.

Offering a glimpse of divisions within the Ukrainian government, Prime Minister Arseniy Yatsenyuk said Friday that any peace plan dictated by Putin would be unacceptable. What Ukraine needs, he said, is for all foreign troops to leave Ukrainian soil and for strong border defenses to be erected, Interfax reported.

Russian analysts have said that the Kremlin wants eastern Ukraine to have enough political power that regional leaders would be able to veto any move by Ukraine to join NATO, which the Kremlin says is a major threat to Russian security.

The violence has claimed the lives of 846 Ukrainian soldiers, a military spokesman said, including seven in the last day.