Peter Gershon, chef executive of the Office of Government Commerce (OGC), said the move was a breakthrough in procurement. "What we have done is aggregate our demand across the whole of the UK public sector."
OGC officials said the deal, which covers some of IBM's Lotus products, Sun's StarOffice and Microsoft Office and Windows products, is likely to save £100m over the next three years - equivalent to the cost of building a major hospital.
The negotiating team included representatives of the OGC, Society of Information Technology Management (Socitm) and the head of procurement at the Inland Revenue.
The new deal builds on agreements made recently between Microsoft, the NHS and Ministry of Defence, in the aftermath of Microsoft's controversial changes to its licensing regime.
Gershon said: "This will provide more choice in the market place and improve value for money for public sector customers."
Bob Griffiths, national secretary of Socitm, said: "We will be able to measure the success of this over the next three months in terms of how many local authorities take it up."
The OGC exerted considerable pressure on Microsoft to bring it to the table, including warning the company that the Government was considering fallback options in the event that no deal was achieved.
Agreement with IBM and Sun Microsystems however has taken public sector IT professionals by surprise.
The agreement covers all areas of the public sector except for regulated industries and utilities, the BBC and the Post Office/Consignia.
Organisations such as the NHS and Ministry of Defence that have negotiated prior licensing arrangements with Microsoft will be able to transfer to the new licensing framework.