Daniel Dal Zennaro, POOL, Associated Press
Russian President Vladimir Putin, left, and Ukraine's President Petro Poroshenko shake hands as they meet on the sidelines of the ASEM summit of European and Asian leaders in Milan, northern Italy, Friday, Oct. 17, 2014. Russian President Vladimir Putin is looking to get relief from Western economic sanctions imposed since Russia's annexation of the Crimean Peninsula and its support for a pro-Russia insurgency in eastern Ukraine. To that end, he has scheduled a series of meetings on the sidelines of a two-day ASEM summit of European and Asian leaders.

MILAN — Russian and Ukrainian leaders sounded optimistic after marathon, Europe-brokered talks Friday, signaling progress on both a definitive peace settlement in Ukraine and a gas dispute that threatens to disrupt supplies to Europe this winter.

While Russian President Vladimir Putin and his Ukrainian counterpart Petro Poroshenko stopped short of declaring a breakthrough, they both spoke with renewed confidence.

Putin offered praise for Poroshenko's move to give more powers to the east and supported the Organization for Security and Cooperation in Europe monitoring of the truce with drones. Putin also voiced confidence that the issue of Russians who have joined the insurgency in eastern Ukraine could be settled.

Both leaders said they reached consent on the basic guidelines of a gas deal to prevent possible supply disruptions in the winter.

The sticking point remains financing, and Putin indicated that the EU should pick up the tab. "We expect our European partners to offer help to Ukraine," he said.

Alexei Miller, the CEO of the Russian gas company Gazprom, told Russian news agencies from Milan that the leaders agreed Kiev would pay back $3.1 billion by the end of the year. It is not clear how much Ukraine would have on hand, raised through loans or with the EU's help.

Russia cut off gas supplies to Ukraine in the summer over unpaid bills, raising the risks that Ukraine would siphon off gas from the pipeline passing through its territory from Russia to Europe.

Europe is concerned that if Ukraine did so, Russia would cut off all flows through Ukraine, leaving parts of Europe without supplies in the dead of winter, as happened in the past.

As part of an overall peace deal, Europe is seeking full compliance with a month-old cease-fire, clear border controls and local elections in eastern Ukraine in compliance with Ukrainian law, and not under auspices of the rebels.

Putin told reporters both sides shared blame for violations.

"The line of division must be fully drawn. It would allow to finally end shootings and civilian deaths," Putin said. "The Ukrainian side knows about that. We will try to find solutions."

Poroshenko said using technology such as video cameras and radar to monitor the border "will allow to determine who is responsible for violating the cease-fire."

Drones will be provided by Germany and France in the first stage, with other countries joining later under the OSCE umbrella, the Ukrainian leader said.

German Chancellor Angela Merkel, who participated in two of the joint meetings and bilaterals with each of the leaders, acknowledged some progress but said basic differences remained.

"We are closer together on some questions of detail, but the central point is whether the territorial integrity of Ukraine is really respected," Merkel said after a morning of talks.

British Prime Minister David Cameron said Russia needed to get its troops and heavy weapons out of Ukraine.

"Vladimir Putin said very clearly that he doesn't want a frozen conflict, he doesn't want a divided Ukraine," Cameron said. "If that is the case, Russia has to take actions to put in place all that has been agreed."

Putin and Poroshenko were pictured at a breakfast meeting shaking hands, as they had a month ago in Minsk, Belarus, when they reached a deal on a cease-fire that has reduced but not halted the hostilities in eastern Ukraine.

The fighting in eastern Ukraine between pro-Russian rebels and government troops began a month after Russia annexed the peninsula of Crimea, killing more than 3,600 people, according to the United Nations. The West, in return, imposed economic sanctions, which Putin is eager to see lifted.

Paolo Santalucia in Milan, Nataliya Vasilyeva in Moscow and Geir Moulson in Berlin contributed to this report.