Jeremy Corbyn had to achieve three things in this speech. The first was finessing the party’s position on the United Kingdom’s customs relationship with the European Union in order to facilitate an opportunity to defeat Theresa May in the House of Commons. The second was in setting out the broad architecture of Labour party’s foreign policy priorities under him. And the third was doing so in a way that didn’t alienate Labour’s Leave voters or force him to say anything he didn’t believe.

And it largely succeeded on all three counts. As far as Labour’s point of disagreement with the government the gap between the two parties is not large though it is of vital importance as far as the Irish border goes. Both parties are seeking a bespoke arrangement after Brexit, but Labour are successfully leveraging the strength of two brands. The first is the party’s overall reputation as a kinder and nicer party than the Conservatives means that “Brexit, but nicer” is a winning message for them politically even if it may stretch plausibility in policy terms. (It’s worth noting that as far as the political complexion of the governments of the EU27 as it stands, the latitude Corbyn is seeking to diverge on state aid and from the European Court of Justice’s pro-business judgements is highly unlikely to be forthcoming.) The second is that Corbyn’s own social liberal bona fides mean he has a great deal of credibility with most Remain voters on other issues so he is given the benefit of the doubt when he sounds an equivocal note on the institutions of the European Union, as he did here.

Those underlying strengths allowed him to deliver a speech that as well as giving Labour the license to oppose the government over the customs union set out Corbyn’s foreign policy priorities at greater length than any speech he has given as Labour party leader. That ranged far beyond the European question, with Corbyn identifying two linked crises that his government would aim to tackle: climate change and the refugee crisis.

That included the most explicitly Eurosceptic lines in a speech from a Labour leader since 1983 and the most explicitly Eurosceptic lines from Corbyn himself since his first bid for the leadership in 2015. The crucial lines concerned the powers that a Corbyn government would seek to diverge from the European Union and its internal market on. The three unspoken but important words were “European Court of Justice”: it is the judgements of that court that trouble many of Corbyn’s closest allies and the Labour leader himself and the desire to escape the demands of the ECJ means that Labour under Corbyn will always be committed to a fairly drastic Brexit in principle. (It also allows the party to do what Corbyn did in 2017 and again today, which is pledge an end to the free movement of people.)

Will it work? If the government were to fall, it is tricky to see how Labour would reconcile its aims as far as the Irish border go with its broader intention to free itself from the demands of the European Court. But as far as a position that allows Corbyn to stay true to himself and for Labour to harry and embarrass the government this speech was a success today.