The long-awaited courtroom collision between the US government and Microsoft appeared imminent yesterday, with the Justice Department and at least 20 states set to file antitrust suits today that could change how consumers buy and use most computers.

With negotiations stalled, the world's most powerful software company has said it will go ahead and today ship the latest upgrade of its flagship software, Windows 98, to computer makers. The company had planned to ship the package on Friday, but agreed last week to delay its release until today, pending the outcome of talks.

Eleventh-hour negotiations collapsed on Saturday over what Microsoft described as the government's ''unreasonable demands,'' including a condition that the company put a copy of rival Netscape Communications Corp's Internet browser in every copy of Windows, the operating system used to run virtually all desktop computers.

''I do sometimes shake my head and wonder why this is happening. I just don't understand,'' Microsoft chairman Bill Gates told Time Magazine. ''We worked hard to settle. I wish we had been able to. I'll seize every opportunity to do so.''

One government official yesterday said that Microsoft ''absolutely refused any meaningful concessions at the end of the day''.

The federal government and the states believe Microsoft is using its market dominance with Windows to illegally stifle competition in other parts of the computer industry, especially the fiercely competitive market for Internet browsers, the software used to view information on the World Wide Web.

Two government officials involved in the talks said independently yesterday that Microsoft withdrew a major concession it had made earlier in the week.

Microsoft acknowledged it made several offers throughout the negotiations but said it withdrew each one only after government lawyers rejected them.

Under antitrust law, a requirement that manufacturers include a competitor's product is usually reserved for cases in which a monopoly owns the sole method of distribution, such as a vital pipeline or electrical lines.