Massive demonstrations involving nearly a million people erupted in Petrograd on 2-3 July 1917, in a colossal outburst of anger and discontent.
Workers, soldiers and peasants were reacting in fury at the failure of the provisional government - installed after the February 1917 revolution - to transform their terrible conditions. They were suffering high food prices, poverty wages, factory lockouts and lack of transport.
Worse, the government had decided in June to initiate a new offensive in World War One, inflicting even greater mass misery. The population was under the cosh of renewed war conditions while the rich wallowed in profits from the high prices of basic goods and from supplying the needs of the war.
The huge force of the early July movement brought the government close to collapse. Reeling in shock at what it saw as a challenge for power - which it was in the minds of many of Petrograd's workers - it ordered soldiers to shoot at protesters, followed by heavy wider repression in which hundreds were killed.
Counterrevolutionary troops were sent to Petrograd, workers and soldiers' arms were seized and revolutionary troops at the front were disarmed.
The Bolsheviks were blamed for the events by the government and their political enemies and suffered a wave of brutality. Many were thrown into prison, including Trotsky and a number of other leaders. Their newspapers and offices were raided and shut down. Lenin fled to Finland, unable to return until the end of September.
So the Bolsheviks - in the middle of a year of mass movements and two revolutions - had suffered a significant setback and were forced into semi-underground work for a number of weeks. As well as the physical attacks against them, they were also up against a major government propaganda offensive that blamed them for the lack of supplies at the front and successes of the German army.
The Bolsheviks' national leaders had not in fact called the demonstrations; they had decided against them taking place.
But when the movement erupted anyway, they realised that their place as a revolutionary party was to get fully involved in the movement - which was expressing desperation for change - in order to try to channel it in an organised direction and minimise the consequences of defeat.
A layer of the population, especially in Petrograd and among soldiers at the front, was in huge ferment and outright revolt. Also, in rural areas attempts by peasants to seize land were taking place.
The movement was disorganised, with many street fights, and grassroots preparations for armed actions; for example, a machine gun regiment was visiting factories to build support for an armed attack on the government.
Workers and soldiers were descending on the headquarters of the soviet executive committee in the Tauride palace, demanding that the soviet - councils of workers, soldiers and peasants - take power. Meanwhile the counter-revolutionary Mensheviks and Social Revolutionaries (SRs) inside the palace were condemning the movement as an assault on democracy by armed gangs!
The Bolsheviks participated in the demonstrations with slogans that included: 'no coalition with the bourgeoisie', 'all power to the Soviets', 'end the military offensive' and 'state control of production'.
The great difficulty they faced was that the consciousness of that very combative layer leading the Petrograd uprising was ahead of the rest of the country. Reflecting this, the Bolsheviks were still only a minority in the key soviets.
The Mensheviks and SRs had the allegiance of a majority of the workers and peasants, as illusions remained in the ability of those two parties to deliver on their promises: to end the war, give land to the peasants, allow workers' control over production, and so on.
But these parties, based mainly on intellectuals and the peasantry, had no viable planned route for delivering their promises or a will to do so, and in reality served as "an instrument of the bourgeoisie for deceiving the people," to use the words of Lenin.
They had learnt nothing from the February revolution which had showed the impossibility of the capitalist class delivering capitalist democracy and economic development, and proved over and over again that they would do their utmost to hand power back to the forces of capitalism and landlordism.
Were the Bolsheviks correct to initially oppose the prospect of the demonstrations, and then to issue a call on the night of 4 July for them to end?
Despite the obstacles, could the movement have gone on to place power in the hands of the soviets or the working class?
Differences in consciousness and mood will always be inevitable, but could those differences at that stage have been overcome by action?
Both Lenin and Trotsky - who together went on to lead the Bolsheviks to achieve a successful workers' revolution in October - explained that at that stage the seizure of power would not have led to holding onto it.
They both judged, at the time and in later analysis, that once the movement had erupted it was correct to call for it to be a peaceful demonstration and not an insurrection. Otherwise, as Trotsky later elaborated, Petrograd in July could have become a 'Petrograd Commune', blockaded in and starved as the Paris Commune had been in 1871.
The July Days were not the first outbreak of mass discontent following the February revolution. There had been big flare-ups in April and June too, during which the Bolsheviks demanded that the soviet leaders take full power and dismiss the useless, capitalist provisional government.
On 18 June nearly half a million people had demonstrated, with Bolshevik slogans being popular. But despite their size, in those protest movements too, leading Bolsheviks had to play a restraining role, warning against attempts to forcibly seize power.
They didn't want to see workers' blood and energy sacrificed needlessly in violent clashes with the pro-capitalist Cadets (Constitutional Democratic Party), reactionary pro-tsarist Black Hundreds and state forces.
Since soon after the February revolution the soviets had co-existed along with the pro-capitalist provisional government, with neither having the upper hand over the other. The representatives of capitalism, in alliance with the landowners, wanted to shut down the soviets but were not powerful enough to do so.
On the other hand the soviets were led by the likes of Tsereteli and Chernov - Mensheviks and SRs who were refusing to seriously challenge the capitalist government. Rather, they were keeping it alive and just aiming to 'check' it.
Wait for the convening of a constituent assembly to solve all the problems, they kept promising, while at the same time doing their best to postpone an assembly.
On 6 May a number of Menshevik and SR leaders had even joined the government cabinet, creating a coalition that for the capitalist class and landlords could better muddy the waters on the true nature of the government. The Mensheviks and SRs proceeded to engage in making deals and shoddy compromises with the anti-working class ministers.
Lenin later commented: "The capitalists gleefully rubbed their hands at having found helpers against the people in the persons of the 'leaders of the soviets' and at having secured their promise to support 'offensive operations at the front', ie a resumption of the imperialist predatory war".
In early July, six government ministers who were in the main party of capitalism, the Cadets, resigned their positions, handing the poisoned chalice of head of government to the SR Alexander Kerensky. However, Kerensky and co were "merely a screen for the counter-revolutionary Cadets and the military clique which is in power at present", assessed Lenin.
This 'military clique' had been deliberately pushed to the fore by the government as a consequence of it ordering the June military offensive. One of the government's objectives was to cut across the revolutionary ferment that was refusing to die down; the population was still desperate to see some results from the February revolution.
The military arm of the state was therefore primed up for the brutal clampdown on opposition to the government and the Bolsheviks after the July uprising.
Outrageously, the Menshevik and SR leaders in various ways either tacitly or more overtly backed the attacks on the Bolsheviks, further exposing their counter-revolutionary nature. "They have sunk to the very bottom of the foul counter-revolutionary cesspool... they basely betrayed the Bolsheviks", said Lenin.
Lenin reassessed the overall situation after the July Days. In June he had already been considering the changes taking place, but he now fully realised that a decisive, objective change had occurred. Instead of 'dual power', the counterrevolution had gained the upper hand, spearheaded by the top military officers and backed by the capitalists and monarchists.
The enemies of the working class backed up Lenin's analysis. After the July demonstrations, Prince Lvov, former head of the provisional government, said in a speech: "What strengthens my optimism above all else, are the events of the past few days inside the country. I am convinced that our 'deep breach' in the Lenin front is incomparably more significant for Russia than the German breach in our south-western front".
Lenin explained that this changed situation meant that calling for the soviets to take power was no longer a correct demand, because they could no longer do so in a straightforward manner, just by deciding to dissolve the provisional government.
Revolts and 'partial resistance' would not be enough, he concluded. Instead it was necessary to win a majority of workers and peasants to the programme of the Bolsheviks and to carefully prepare for an armed uprising when the right conditions come together for it to succeed. There would be complete victory for a military dictatorship unless there was a new workers' revolution.
In laying down this clear path, Lenin was issuing an obituary for the soviets if they remained led by counterrevolutionary parties: "At the moment these soviets are like sheep brought to the slaughterhouse and bleating pitifully under the knife. The soviets at present are powerless and helpless against the triumphant and triumphing counter-revolution."
Lenin's position was agreed by the Bolshevik congress that started on 26 July (during which Trotsky's Bolshevik membership was also agreed).
The slogan 'all power to the soviets' was withdrawn in favour of 'power for the working class and peasantry'.
Just seven weeks later, when the Bolsheviks won a majority in the workers' section of the Petrograd Soviet on 9 September - with Trotsky elected as its chair - they were then able to say: 'all power to the Bolshevik Soviets!'
The July Days contain many lessons for struggles and movements today.
One of them is that a revolutionary party should not simply endorse every mass movement or assault on capitalism that arises, without trying to steer it in a direction that will help to unify, strengthen and take the entire workers' movement forwards, as the Bolsheviks did.
However, perhaps the most important lesson is the way in which vigilant Marxist analysis along with democratic debate and discussion can enable a revolutionary party to weather a period of setback and reorientate its forces to build for future victory.
20 Jun Save our NHS
13 Jun No to Trump and Tory racism
Phone our national office on 020 8988 8777
Locate your nearest Socialist Party branch Text your name and postcode to 07761 818 206
Regional Socialist Party organisers:
Eastern: 0798 202 1969
East Mids: 0773 797 8057
London: 020 8988 8786
North East: 0784 114 4890
North West 07769 611 320
South East: 020 8988 8777
South West: 07759 796 478
Southern: 07833 681910
Wales: 07935 391 947
West Mids: 02476 555 620
Yorkshire: 0114 264 6551