On one ever expected a machine as complicated as government to run without one part bumping into another. But only once in a while do two of the parts crash headlong while both are just doing what's required of them.

In this case, two agencies, the Commerce Department and National Aeronautics and Space Administration, through their own honest efforts, come into direct conflict. The public, as usual, may end up paying the bill.

Commerce enforces the Educational, Scientific, and Cultural Materials Importation Act, which allows nonprofit organizations, including government agencies, to import, duty free, scientific equipment that cannot be produced in the United States.

NASA runs the space shuttle program. With specific congressional encouragement, it has involved America's allies in space exploration by having them develop and build -- at their expense -- components for the shuttle in return for being able to participate in later space flights.

In August, 1973, NASA signed an understanding with the European Space Agency, which subsequently was embodied in an intergovernmental agreement. It provided for ESA's development and construction of Spacelab, a pressurized module to be placed in the shuttle so that in-flight laboratory experiments could be performed.

In May, 1978, NASA signed another agreement, this time with Canada, for the latter to produce a custom, remote manipulator system to lift experimental materials or sensors outside the shuttle and then return them to the payload area.

Under the agreements, NASA was not to be charged for either development or production of the first unit, and subsequent units would be bought "at reasonable prices," according to the May 21 Federal Register (page 27737-27744).

In 1979, NASA realized it had to get clearance from Commerce to bring what was to be almost $1 billion worth of equipment into the United States. That's when the trouble started.

It seems that Commerce called on the National Bureau of Standards for advice on whether the Spacelab and remote manipulator system could not have been developed by American companies, a finding required to permit their entry duty-free.

NBS, in both cases, said no, domestic industry was capable of building what the foreign groups had done.

Commerce then turned NASA down, and the space agency appealed, saying that Congress had never approved funds to be spent on the development of either system, and therefore NASA could not have purchased them in the United States.

On May 20, Commerce again ruled against NASA, saying although it understood why the foreign deals were made, Commerce "may not substitute the merits of any such policy for its statutory responsiblity to administer the act."

It's now up to the Customs Bureau to determine how much duty NASA must pay -- near $12 million, according to a Commerce official. Or NASA may go to Congress for a bill to allow the items in free, an approach suggested by Commerce.

Of course, one government agency paying another for duty on these imported items is just a paper transfer.

The real expenditure has come from the hundreds of hours of work over the past three years as at least three agencies worked on what Commerce says has been the biggest and most complex of its duty-free scientific import cases.