At some point between the Boris Johnson-Ursula von der Leyen dinner on 9 December, and last Sunday morning, something changed.

The dinner had gone badly. Both sides issued terse statements as Boris Johnson's black Mercedes pulled out of the European Commission's Berlaymont headquarters.

Big gaps remained. The next day Boris Johnson said 'no deal' was now a "strong possibility".

The Sunday Times political editor Tim Shipman portrayed a chilly encounter in which Johnson urged von der Leyen to sideline the EU's chief negotiator Michel Barnier, joking about how both the Brits and Germans knew "how difficult the French can be".

Yet, by Sunday lunchtime Johnson and von der Leyen were able to hold a 30-minute phone call that the European Commission President described as "constructive and useful". 

They agreed it was "responsible ... to go the extra mile".

We need your consent to load this rte-player contentWe use rte-player to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences

What happened in between?

It has since emerged that Johnson and his chief negotiator David Frost had brought some new proposals, but nothing substantial on the level playing field.

"It's not that the atmosphere wasn't bad," says one diplomat, briefed on the dinner. "It was. The UK did come with some movement on various files. But they still lacked any commitment to the level playing field problem."

The EU has insisted that if the UK diverged from EU standards over time, Brussels should have the right to retaliate and modify the UK's access to the single market.

"The UK didn't seem to want to accept [the EU position] on ideological grounds," says the diplomat. "But shortly after the dinner - not at the dinner - but on Thursday, something happened. Something clicked. They said, we're willing to entertain this." 

Although the full details have yet to emerge, a key figure in this final, white-knuckle act of the Brexit drama is Stéphanie Riso.

Sabine Weyand (L), Michel Barnier and Stéphanie Riso (R)

A 44-year-old economist from the French Alpes-Maritimes region, Riso joined the European Commission in 2007 and worked under the then Economic and Monetary Affairs Commissioner Ollie Rehn in the run up to the Irish bailout.

Riso became Barnier's principal advisor in 2016 for the long and gruelling Brexit Withdrawal Agreement negotiations, and was steeped in the complexities of the Irish border.

In 2017, the Brussels edition of POLITICO placed her at Number 13 in their top 20 Female Powerhouses.

"Riso has a reputation as a serious, hard-working economist," the paper noted, "who is especially appreciated by the British Brexit negotiating team, some of whom ... prefer her to Barnier".

Having helped steer the Withdrawal Agreement to a successful conclusion in October 2019, Riso was appointed by Von der Leyen as deputy head of cabinet and her chief Brexit advisor.

This autumn, as the free trade negotiations lurched from one deadlock to the next, Von der Leyen gave Riso a more frontline role. She joined Barnier both in London and Brussels, reporting back directly to von der Leyen and her head of cabinet Bjoern Siebert.

"The presence of Stéphanie Riso has been taken as evidence that the von der Leyen cabinet was more or less taking control of the negotiations," says one EU diplomat. "People speculate that her presence was there to promote a deal." 

Barnier was conceding too much to the influence of Riso's "problem-solving" approach

It would be an exaggeration to say that von der Leyen used Riso to undermine Barnier. He has remained in charge of the EU's position. However, Barnier had become such a target of abuse in the UK media that having a fresh pair of eyes and ears helped the chemistry.

Riso also brought to bear a formidable mastery of detail that was innate and was the culmination of her time in the Withdrawal Agreement trenches.

"Riso has been instrumental," says another diplomat. "What matters is that she came in with the technical experience, a more in-depth knowledge of what is possible in this relationship [between the EU and UK] and what isn't. She's one of the key players."

However, her new role was not always appreciated.

"There was a moment when member states weren't too happy with what she was doing because she was too much on problem-solving mode," says the diplomat.

During one briefing of EU ambassadors, when Barnier spoke of a potential breakthrough, the Netherlands, France, Spain, Italy, Belgium and Denmark intervened.

Barnier was conceding too much to the influence of Riso's "problem-solving" approach, they argued. The UK was not reciprocating.

"We had to pull the brakes because Barnier had indicated that things were looking up and we had introduced flexibilities [within the level playing field], meaning the UK had come on board. 

"The deal had always been that, yes, the UK can have more flexibility and divergence [from EU standards] as long as we've got levers to pull on the divergence side. But there was nothing on any such enforcement." 

However, with Riso there was also the sense that her long-time colleague Sabine Weyand was never far behind. Although Weyand had left Barnier's Withdrawal Agreement Task Force to become Secretary General of the commission's trade division, she remained a highly influential presence. 

"With Riso you got Sabine as well," says one diplomat. "The trust in Sabine is still very high among member states."

Riso was testing ideas. She proposed a Joint Committee made up of officials and political figures from both sides, perhaps based on the committee that oversees the implementation of the Withdrawal Agreement.

The EU had wanted the right to retaliate automatically if the UK diverged too far from EU standards, thereby gaining an unfair competitive edge. What if they brought their concerns to a Joint Committee first?

"It sounds sensible," said one UK source. "And I can imagine it would be something we'd be interested in. It's kind of standard in trade agreements. Dispute resolution normally involves a bit of process before you do anything."

British Foreign Secretary Dominic Raab

It's not clear if this idea will make it into the treaty, nor is it clear that the Joint Committee approach is what prompted the UK to move. But Riso's creativity is thought to have helped.

"Perhaps her ideas created the space for the UK to step into," suggests one diplomat.

It seems the UK took that step following the dinner. Contacts over the weekend picked up. On Sunday morning, Foreign Secretary Dominic Raab's TV interview rounds included an ever-so-subtle shift.

Raab told the BBC's Andrew Marr that "creative contours in the drafting" could get a deal over the line. He also told Sky's Sophie Ridge: "At the last stage the EU has found letting go of its control over the UK very difficult."

To officials watching from Brussels this was the classic straw man tactic. "Raab sold the EU position in such exaggerated terms that they can always say, we've talked the EU down to this managed or balanced equivalence or whatever Johnson is going to sell it as," says one official.

Then came the Johnson-Von der Leyen phone call on Sunday. The next morning, Michel Barnier briefed EU ambassadors. There had been a shift in the UK position.

"Barnier emphasised that the British had accepted in principle that if they diverged the EU could react [with tariffs]," says one source present. "Up until then they hadn't accepted that principle. He claimed that was a breakthrough."

However, the EU had also shifted.

"Originally, the EU wanted the autonomous right to do something without reference to the UK. Now there has to be some sort of dialogue," says the source.

Barnier also told ambassadors that the UK had accepted the principle of "cross-suspension", the ability for either side to retaliate in one sphere if there had been a perceived unfair advantage in another.

"The right to take countermeasures is recognised," says the source, "but how you go about it is the question. [There would be] some sort of analysis of the implications, then arbitration. But that's all under discussion."

Now the phrase du jour was "managed divergence", but the discussions remained painfully slow. 

"It's so much of an inching forward and inching back," said a senior official from one member state. "It's painstakingly slow progress. The Brits seem to have accepted from a political point of view this principle of a 'rebalancing mechanism', but it's clearly the hybrid of the two approaches."

Working out the detail would be difficult. How exactly would an arbitration process work? How would the EU be able to prove that, if the UK had diverged on, say, parental leave standards, that would give UK firms a material advantage?

The renewed air of optimism was making Downing Street nervous. On Monday, the Financial Times' respected political editor George Parker reported that Number 10 had shifted from 'no deal' being a "strong possibility" to it only being a "possibility".

He was corrected by a senior government figure a few hours later. No deal was once again "the most likely outcome".

A senior Irish figure said the sudden thaw, described as "heavy breathing", was starting to work, but work too well. London was toning it down.

However, momentum was tangible. Both sides had shifted the level playing field trolley off the political kerb and into the technical space.

"It feels to me that it is moving into deal territory," said the source. "Leaving aside the spinners, most people would say that's the only logical way you can read this. Although the timing now is leading to its own shit show."

That was a reference to the European Parliament. 

MEPs had grown increasingly resentful that negotiators were running down the clock. They were being left barely any time at all to scrutinise the treaty to which they must give their consent.

On Wednesday, Philippe Lamberts, the Belgian Green MEP and member of the Parliament's UK Coordination Group, told RTÉ News it was already too late for MEPs to give their consent in time for 1 January.

Belgian Green MEP Philippe Lamberts

"It won't happen," he said. "Let me be blunt: the very fact that people consider that [idea] within the European Parliament or outside are an insult to Parliament. We are not the House of Commons.

"We did not create the problem. They created the problem, because they missed one deadline after the other. So, I don't see why parliament should swallow whatever it is given."

Member states also have to give their consent and not all countries follow the same procedures. 

"National governments need parliamentary checking: votes, resolutions, support in one way or another," says a senior EU diplomat. "This takes time."

Another EU source points out: "This is the most important trade deal the EU will be agreeing and negotiating. It would be absurd for member states to spend loads of time wrangling over agreements with Mercosur and Singapore, and then just blindly sign off on a deal with potentially its biggest trading partner and biggest competitor."

On Thursday, the issue went before the Conference of Presidents, the main political body in the European Parliament, which brings together the leaders of the political groups and which sets the agenda for plenary sessions.

Following a three-hour meeting the body declared that the European Parliament could ratify the treaty on 28 December, but only if British and EU negotiators got the deal over the line by midnight on Sunday.

Manfred Weber, the head of the centre right EPP group, tweeted: "We owe it to the people and businesses in our constituencies who will be heavily affected by Brexit, to scrutinize the deal appropriately. After Sunday we don't believe this would still be possible."

Indeed, even the basic procedures take time. Once a deal is done by the two negotiators the text must be legally-scrubbed to ensure all the pieces fit. Then it would normally be sent for translation into 23 official languages, but that option has now been dispensed with.

Instead, the master text in English will go straight to national capitals. Once they have approved the text, there is what's called a Council Decision on Signature and only then can it go to the European Parliament.

If that pushes things beyond 28 December there are few options.

The most obvious one is that the EU and UK agree to provisionally apply the treaty on 1 January, with the parliament ratifying later. 

However, MEPs regard this as treating parliamentary consent as an afterthought. Von der Leyen and Barnier are also keen to avoid provisional application, as is the UK.

Ursula von der Leyen addressing the European Parliament

"If we get it done by the weekend, that gives you two weeks," said one UK source. "It will be tight. But we think there's time to get it done."

While this side drama was being played out, negotiations continued in ever tightening secrecy. 

There were still outstanding issues on the level playing field. Michel Barnier told the College of Commissioners on Tuesday that the UK had accepted the principle of cross-retaliation, but London wanted a carve out for financial services.

The UK was also pushing against level playing field constraints on the energy and aviation sectors.

On Wednesday morning Ursula von der Leyen told the European Parliament that there was a "narrow path" towards a deal.

In London, Jacob Rees-Mogg, the Leader of the House of Commons, put MPs on notice for a recall next week, while in Brussels, the German EU Presidency scheduled provisional meetings of EU ambassadors.

But the true picture was unclear. "We're all waiting," said one diplomat on Thursday. "Occasional bits of information trickle out. But the shutters have come down."

That evening, when von der Leyen held yet another phone call with Boris Johnson, the main topic appeared to be fisheries.

However, the call also touched on a last minute dispute over state aid.

The issue concerned the EU's €750bn Covid recovery fund which, combined with the seven-year budget, amounted to a €1.8 trillion stimulus package for member states.

Downing Street briefed journalists after the Thursday call that, whereas the EU's Covid fund would be exempt from state aid rules, any bailing out of UK companies by London would be captured by whatever state aid rules within the treaty.

In reality, this issue had surfaced a number of weeks ago, but had not blown up into a full scale row.

"To say there's this big multi-billion euro fund used to recover from Covid and it's not subject to state aid rules, but any UK fund would be, will not be acceptable," said one source.

The EU's response has been that individual member states are subject to stringent state aid rules and that is the correct context in which to view the level playing field. In other words, the UK should also be subject to similar rules.

However, money gathered collectively for the EU budget is spent not by member states but by the European Commission.

Under the Lisbon Treaty, the commission is the sole authority for disbursing budget funds and to have that come under UK surveillance, say officials, would require a change in the treaty.

On Friday morning, the fisheries negotiations resumed with full force. 

Post-Brexit fisheries policy remains a key sticking point in the trade talks

Neither side had shown any willingness to move on pre-existing positions. The EU was still proposing to hand over 18% of the value of the stocks in UK waters, with a phasing in period of up to ten years, and a review clause that would keep the link between fisheries and the wider free trade agreement (FTA).

"If the UK then wants to cut access to these waters for European fishermen, at any given time, then the European Union also has to maintain its sovereign right to react or to compensate by adjusting the conditions for products, and especially fisheries products to the single market," Barnier told MEPs on Friday morning.

By contrast, the UK had been pushing to take 60% of the value of fish (roughly a €300m down payment in quota by EU boats) and a three-year phase-in after which, according to one source, "all bets are off".

London was also insisting on keeping all European boats out of the UK's six-mile to 12-mile coastal zone, and on stripping pelagic stocks - mackerel, whiting and Atlanto-scandian herring - out of the agreement altogether and instead have them negotiated through an informal forum of fishing states that includes Russia, Norway, Iceland, the Faroes and Greenland.

The mood on the EU side had not been helped by a UK paper, tabled on 6 December, setting out strict new conditions for European companies owning UK-flagged vessels.

Under the proposal, all UK-flagged boats would have to be crewed entirely by British nationals, would have to be "wholly owned" by British companies "with an effective and continuous link with the economy of the UK," or wholly owned by UK nationals.

Furthermore, if the vessels had European owners a significant percentage of the fish caught in UK waters would have to be landed in British ports. 

To Spain and the Netherlands this amounted to expropriation, given that, according to a BBC investigation, Spanish and Dutch (as well as Icelandic) operators own more than half of England's fish quota by value (or 130,000 tonnes per year), and that quota is linked to the ownership of particular fishing boats.

UK sources said this was entirely in keeping with EU rules on boat ownership. 

EU officials acknowledged that the UK could organise its own industry once outside the Commons Fisheries Policy (CFP), but this is now an issue of fairness for European owners. 

"They invested in British boats," says one diplomat, "then, now suddenly you can't use those boats the way you wanted to use them. Of course, the UK has the right to regulate, but at the same time there are ownership rights. Now suddenly a European owner of a British boat doesn't have the same rights as a British owner." 

Barnier was due to hold an internal "barnstorming" meeting on fisheries with senior officials, including Stéphanie Riso, on Friday morning.

He then held two video conferences with the chief advisors, or sherpas, of the coastal states prime ministers to see what room for manoeuvre there might be. 

According to one source briefed on the calls, Barnier tested the idea of increasing the quota offer to the UK from 15% - 18% up to 22% - 23%, and to reduce the phase-in time from ten years to "eight or seven" years. 

But this was unlikely to shift the UK from what looked like a hardline position. One source said the only movement on Friday from the UK side was that the €300m down payment of demersal stocks could be phased in over three years, with 40% in year one, and 30% in years two and three.

As the talks continue into the final hours, both sides are showing a significant amount of political mettle. The notion of an honourable compromise feels entirely absent.