The death of Jimmy Reid reminds us of those epic years in British working-class history in which a Conservative government was first forced into comprehensive retreat and then electorally defeated writes John Foster in the Morning Star.

It is a period that has much to teach us today. This is particularly so for the 1971-2 work-in. Newly available official records reveal far more clearly why Edward Heath's government became so concerned at events at one shipbuilding firm on the Clyde.

As today, the Conservative government came to power pledged to cut back government expenditure, close down industrial "lame ducks," curb wage increases and end costly schemes for regional economic development. In particular, it sought to destroy the power of an increasingly militant shop stewards movement and impose the type of legal controls that the previous Labour government of Harold Wilson had been forced to abandon. Its tool was to be higher unemployment.

Three months before the election the party's Seldson Park declaration supported policies which, in part, reflected the extreme right-wing monetarist views of Keith Joseph. Over the previous year Joseph's deputy Nicholas Ridley had toured Britain talking to major regional employers. While visiting the Clyde he had drawn up highly confidential plans to "butcher" the semi-nationalised Upper Clyde Shipbuilders (UCS) as a "cancer" that was forcing up wage rates in the private yards.

This was the background to the announcement by the industry minister John Davies in June 1971 that the government was refusing further trade credits to the four yards operating within UCS. Government papers show that at this stage they were expecting an administrator to impose an orderly run-down - 6,000 redundancies by the end of the year and the sale of one remaining yard to the private sector.

This did not happen. Instead the shop stewards co-ordinating committee seized the initiative, occupied the yards and announced that it was establishing a work-in and production would be maintained - those declared redundant would continue to work and be paid. But no-one would enter or leave the yards without the authority of the shop stewards co-ordinating committee.

Why didn't government move in, arrest the leaders and accuse them of trespass and conspiracy, as they did to the building workers' leaders?

The answer takes us to the heart of the power of the shop stewards. It was not the threat of violence, although some have quoted Glasgow's chief constable as saying he would need 5,000 additional men to retake the yards.

It was the result of two things. One was the stewards' ability to exploit contradictions in the government's own strategy for subduing the trade union movement. The second was their ability to keep the workforce united and build much wider alliances. Both were linked to a third factor.

The leading stewards had theory. They were communists. They possessed a clear understanding of monopoly capitalism, of the ruling class, of social democracy and its contradictions.

The Heath government's tactic for controlling the trade union movement was to use the official movement against the unofficial - to impose a legal straightjacket on trade unions that would force the leaders to discipline "strike-happy" stewards.

This meant, especially in the summer of 1971 as the Industrial Relations Act was coming into force, that the government had to give place to the official union leadership - in this case the right-wing secretary of the Boilermakers union Danny McGarvey.

Government papers show constant private discussions with McGarvey. Originally he was to come in as a saviour, successfully negotiating the salvage of one yard - "a quarter loaf better than none" - but in doing so fatally dividing the complex workforce spread across four yards. McGarvey constantly assured ministers he was just about to go straight to the workforce and isolate the stewards. But he never quite managed it.

In the meantime the stewards took the initiative ideologically and transformed the issue from "jobs at one workplace" to "the right to work." They won a recall of the Scottish Trades Union Congress. They used their influence in local government - there were four communists on Clydebank Council - to convene a meeting of all local authorities to discuss the attack on the Scottish economy.

Most damaging for the government, they were able to call, with STUC support, two regional one-day stoppages across Scotland on Scottish unemployment. These were precisely the type of political - and unofficial - strikes that the government had wanted to halt.

In this the stewards were greatly assisted by the leaking of Ridley's memorandum on "butchering" the yards. This enabled them to win a new phalanx of allies among the small shipyard supply firms set to lose millions as a result of the "inevitable" bankruptcy of UCS.

By August ministers were aghast at what they described as the stewards' ability to secure a "monopoly of publicity" and the government's crumbling political support in Scotland. Worse than this was the impact on their wider strategy to control the trade union movement.

In September secretary to the cabinet Sir Burke Trend wrote an internal review of the government's first 15 months.

A key objective of the government, he reported, had been to "reform the trade unions" and curb "left-wing militancy." It had passed the Industrial Relations Act but unfortunately "extreme militancy has become more rather than less evident that it was 15 months ago" and attributed this to "the UCS situation." An immediate issue was therefore "how to lower the currently inflamed temperature of debate about industrial affairs" and the impression of "a lack of concern over the plight of individual groups of workers."

This was the beginning of the U-turn that ultimately led to the saving of all four yards in 1972.

The stewards' success was not accidental or arbitrary. It was because they had a plan and knew what they were doing. It was about building class-based alliances. They sought to win as much of the official movement as they could, isolate the right-wing and raise demands that united working people across Britain - "no return to the 1930s."

At the same time they sought to exploit divisions within capital locally, raise the issue of Scotland's regional economy and strike at the local base of the Conservative Party.

The stewards never spoke about creating an "anti-monopoly alliance" when addressing mass meetings, but the same people certainly did so when addressing Communist Party congresses.

The result of their success was to encourage workers elsewhere to take similar action - 200 other occupations took place over the following year. At the same time the "unofficial" action at UCS forced the leadership of both the TUC and the Labour Party to associate themselves with what were precisely the "illegal" courses of action they had previously condemned. In September 1971 the TUC voted to refuse to comply with the Industrial Relations Act and discipline any union that did.

Today the best tribute to the stewards who led the UCS is to learn the lessons of their action. At a time when the trade union felt beleaguered and isolated, and resistance to the Industrial Relations Act appeared to have petered out, the stewards were able to launch the first of a series of class alliances that left the Tory government outflanked and, eventually, defeated.

The government's own records reveal how seriously it took the ideological and organisational challenge.