There are two kind of battles in politics: the noisy ones and the stealthy ones. The high-decibel clashes grab all the attention because they generate visible mayhem and buckets of gore. So eyes have been on the Conservatives over the summer weeks as the Brexit battlefield has resounded to the clang of Tories swinging war hammers at other Tories.

All the while, another struggle, one conducted in the shadows, has been taking place at the apex of the Labour party. This battle has been much less cacophonous, and thus not noticed, but it is of great potential significance. This battle has been about the position Labour should strike and it matters because it has big implications for the fate of the Brexit legislation when parliament returns next month. Key members of the shadow cabinet have been wrestling with the argument over August and it came to a head in the past few days. In your Observer today, we bring you the first news of the outcome.

Labour’s posture since the referendum might be generously characterised as constructive ambiguity and less kindly described as consciously incoherent. Having a foot in both camps served Labour well when Britain went to the polls in June. The recent analysis by the British Election Study came to the conclusion that it helped the party to maximise its support among convinced leavers and furious remainers. Yet an increasing number of Labour voices have been arguing that fudge is not a sustainable strategy for a party that aspires to be taken seriously as the next government.

Today, in our pages, Keir Starmer, the party’s principal spokesman on Brexit, brings a new clarity to Labour’s position and, in doing so, finally defines a clear dividing line with the Tories. He announces that Labour, previously evasive on this issue, will seek to keep Britain within both the single market and a customs union during any transitional period which follows its departure from the EU.

What has prompted this shift by Labour and why now? One reason is the calendar. When MPs return to Westminster in September, the first business on parliament’s plate will be withdrawal. They will debate the gargantuan slab of legislation paving the way for Britain’s departure. Given the trouble and strife in the Cabinet, the principal party of opposition ought to have many opportunities to serve both its own cause and the national interest by giving the government hell. Labour’s ability to expose the many holes and contradictions in the government’s position was going to be terribly handicapped if the party’s own posture lacked credibility. In discussions with other members of the shadow cabinet, Mr Starmer has been heard to argue that Labour would look ludicrous if its representatives could not give a straight answer to the question whether or not Britain ought to remain within the single market during the transition.

The new Labour position that he has crafted comes with advantages and risks. It will be broadly popular with trades unions and business organisations, which largely favour keeping Britain within the single market. Members of both stand to suffer from a cliff-edge Brexit which sees Britain crash out of the world’s most prosperous free trade area without a viable agreement about the future relationship. Putting the Labour frontbench behind keeping Britain in the single market beyond 2019 has the effect of widening and strengthening the arguments for a softer Brexit. Labour is also offering some succour to those who think that Britain would be sensible not to torch all its bridges to Europe and close down all its options during the transition – including the ultimate option for the country to change its mind if it doesn’t like the look of where it is going to end up.

A sniff of power has wafted into Labour nostrils, and that scent has influenced the mood at the top of the party

The shift will be welcomed by the substantial wedge of the parliamentary Labour party who have been agitating for the leadership to take a more robust position against the government. It will not be popular with the tiny minority of MPs who favour a stark Brexit. Then there is the larger number of Labour MPs who, while regretting the referendum result, think it has to be honoured and doing that means ending freedom of movement. There will be those who will be uncomfortable and there will be others who will be cross with a policy which means supporting the continuation of freedom of movement for at least two years after Britain has left the EU. Mr Starmer may face some turbulence from MPs still fearful of doing anything that can be painted as trying to defy the referendum result. Hardcore Brexiters will have a go at Labour. So may some of the more ardent remainers who want Labour to oppose Brexit altogether.

The party’s new position remains vague about the final destination that it wants for Britain. About that, Mr Starmer argues for staying “flexible”. He can be mocked for this. But not by Tory ministers. Not when their negotiations with the EU have yet to agree the basics of withdrawal and no one is expecting much progress when those talks resume in Brussels this week. Not when members of the Cabinet can’t give an agreed description of what they want the future relationship with the EU to look like. The “position papers” recently published by the government ooze so many uncertainties that they ought to be called “options papers”.

This change in position could not have happened without the agreement of Jeremy Corbyn, and that could not be taken for granted at the start of the debate between senior members of the shadow cabinet. Earlier this year, the Labour leader walked through the same Aye lobby as Theresa May for the vote to trigger Article 50 and he whipped Labour MPs to join him there. It is less than two months since he fired three frontbenchers when they supported an amendment to the Queen’s Speech calling for Britain to stay within the customs union and the single market.

The Labour leader, a career-long Eurosceptic, has not agreed to recalibrate the party’s position on Brexit because he has fundamentally changed his mind about the EU. But Mr Corbyn is more of a politician than his detractors or his admirers often acknowledge. On some things, at least, he can do pragmatism and triangulation as well as any of the other grubby compromisers in the rough old trade. His inner circle and his allies in the shadow cabinet include both Eurosceptics and Europhiles. He has surely noticed – everyone else certainly has – the dislocation between his views about the EU and those of the crowd who adored him at Glastonbury. The younger voters who helped him to upset election expectations in June are overwhelmingly opposed to Brexit, as are many of his most passionate devotees within the party. A poll for Labour List, conducted before the announcement of this shift, found a substantial majority of party members thought Labour had not adopted a Brexit policy that was sufficiently different to that of the Tories.

A sniff of power has wafted into Labour nostrils since June, and that mind-concentrating scent has influenced the mood at the top of the party. The shadow cabinet has had to think about what they would face if this minority Conservative government were to collapse and an early election propelled Labour into power to take charge of the Brexit negotiations. In the probably more likely scenario that the election comes later, Labour would obviously hope to reap a dividend at the ballot box if the Tories have delivered a bad Brexit deal or a disastrous no deal.

In the event that Britain’s departure from the EU goes horribly wrong, Labour wants to be able to heap all the blame, every last ounce of it, in the laps of the Conservatives. That will be harder to do if Labour has been seen as an accomplice of Tory Brexit. It has been the cry of both the Lib Dems and SNP that Labour has been conspiring to facilitate a Tory drive towards an economically ruinous hard Brexit. They have attacked Mr Corbyn as a “red Tory” when it comes to Europe. That has stung a little. It has also increased the pressure from Labour MPs for their party to bring some stronger opposition to bear on the government.

This brings us to the most important question about Labour’s shift. Can it force a change on the government? It is possible. Labour’s position on the transition has the potential to be a rallying point for parliamentary opposition to a hard Brexit. The Lib Dems and the Nationalists back continuing membership of the single market. So the key will be persuading sufficient Conservative MPs to join hands with the opposition parties against the government. Lines of communication are already open between opposition MPs and around 20 Tory backbenchers who might be willing to support amendments to the Brexit legislation.

By my rough and ready calculation, there are sufficient Tory MPs who agree with the Labour position on the transition to conceive of it assembling a majority in parliament. Mobilising them will partly depend on how artful Labour can be about waging this struggle in the Commons. Success will also be contingent on the struggle within the breasts of these Conservative MPs between their party loyalties and their consciences. That will be the next battle to watch out for.