Sanchez didn't go into detail about the agreement over the tiny territory on Spain's southern border, which London has controlled for three centuries against Madrid's wishes.
"There is a message of goodwill", said Antonio Tajani, president of the European Parliament.
British Prime Minister Theresa May and other European Union leaders voiced renewed confidence on Thursday they could secure a Brexit deal, saying they were working hard to overcome the hurdles that only days ago brought the talks to a halt.
The summit also was meant to lay the groundwork for an additional planning meeting next month for the U.K.'s exit - though, as the BBC writes, it's possible that European Union leaders will formally say they are going to use the November gathering to prepare for that no-deal scenario.
Under the EU's backstop proposal Northern Ireland would stay in the single market and customs union while the rest of the United Kingdom withdraws. "It's a matter concerning Britain's political ability to find a presentable agreement". Both sides agree there must be no hard border, which could disrupt businesses and residents on both sides and undermine Northern Ireland's peace process.
"A further idea that has emerged, and it is an idea at this stage, is to create an option to extend the implementation period for a matter of months - and it would only be for a matter of months", the prime minister told reporters in Brussels. Agreement on such an extension could help break the deadlock on the talks.
"This prolongation of the transition period probably will happen. It's a good idea".
"I think this is giving us some room to prepare the future relationship in the best way possible".
But, she added; "Where there's a will, there should be a way, and normally there is a way".
Earlier, the PM insisted "now is the time" to agree a Brexit deal as she urged EU27 leaders to compromise on the Irish backstop to enable her to get a final agreement through Westminster by Christmas. "Where there's a will, there should be a way, and normally there is a way".
British Prime Minister Theresa May said Thursday she is considering a European Union proposal that would keep Britain bound to the bloc's rules for more than two years after it leaves, and idea that angers her pro-Brexit critics in the United Kingdom. This is just one of many huge risks May will have to take in the coming weeks.
And the suggestion that Britain could stay firmly in the EU's sphere for longer than the 21 months expected has fired up those who already say Britain has already given up too much in the negotiations.
Mrs May's offer of an extension is proving unpopular with Tories in both the Leave and Remain wings of her party, however, and her own Secretary of State for Scotland - the normally europhile David Mundell - has broken ranks to say an extension of the transition period would be "unacceptable" as it would expose Scottish fishermen to further privations under the EU's highly damaging Common Fisheries Policy (CFP).
At present the two sides are proposing that Britain remain inside the European Union single market and bound by its rules from the time it leaves the bloc in March until December 2020, to give time for new trade relations to be set up.
Antonio Tajani spoke after listening to her address in Brussels, where she is meeting the other 27 European Union leaders on the talks, stalled over how to ensure a continued open Irish border after Britain leaves.
British Prime Minister Theresa May is still hopeful of negotiating a withdrawal deal from the EU.
At present the two sides say Britain will remain subject to the bloc's rules from Brexit day on March 29 until December 2020, to give time for new trade relations to be set up.
It was a marked change of tone since May's Brexit minister Dominic Raab left Brussels on Sunday after the more than year-long Brexit talks broke down over the border issue.
May said Thursday that the U.K.is considering extending the transition period by "a matter of months".
The extension idea angered pro-Brexit UK politicians, who saw it as an attempt to bind Britain to the bloc indefinitely.