Two U.S. telecommunications companies have teamed up with a group of European railroads on a project to do over there what was done here more than a decade ago: open up the long-distance telephone business to competition.

Many European governments and state-owned phone companies are dead set against such a change. As such, the project promises to offer a new test of the continent's movement toward economic integration, free enterprise and free trade.

The U.S. firms are Nynex Corp., the New York-based regional phone company, and US Sprint Communications Co., the country's third-largest long-distance carrier. They and four European companies will work with the Hermes organization, a cooperative group composed of the rail systems of 11 European countries.

Officially, the purpose is to evaluate the regulatory environment in Europe and study a possible upgrading of a data-communications system that Hermes members built years ago to advise each other of train movements and passenger lists. That network consists of low-capacity copper wires strung along railroad rights of way.

But, amid reports they want to replace the network with modern fiber-optic cable capable of carrying phone calls, video images, facsimile transmissions and computer data in mammoth quantities, many analysts assume the goal is much bigger -- that is, rights to carry other people's communications between the countries of Europe and perhaps within them.

That would fly in the face of the current structure of Europe's telecommunications industry. In recent years, many countries there have deregulated provision of services and equipment. With the exception of Britain, though, all have decreed that there will be only one transmission system within their borders. In most cases, it is owned by the government.

"We have one of the most advanced telecommunications networks in the world," said Jean-Baptiste Main de Boissiere of the French government's General Directorate for Regulation. "... There is no need to change." Letting the Hermes network compete against the state-owned France Telecom, he said, would also violate French law.

European governments tend to preach the philosophy of America's old Bell Telephone System, broken up by court order in 1984, that a single system operated as a public trust is the best way to provide universal service to rich and poor alike and to coordinate standards for new services.

In many cases, the telephone systems are also cash cows for their governments. They are helped, many economists say, by prices that are inflated due to lack of competition. Resulting revenue may be used to keep general taxes lower or to subsidize other government services, such as the postal system.

The exception is Britain, which under the government of Prime Minister Margaret Thatcher sold the state-owned telephone system (now known as British Telecommunications PLC), licensed a competing network and is debating a proposal to further throw open the field.

The United States currently has three large long-distance companies operating independent networks, plus hundreds of small companies leasing and "reselling" lines on larger ones. Many analysts believe that this competition has accelerated the lowering of prices and the introduction of new services; others complain of confusion.

If Hermes succeeds, it will follow a track pioneered by U.S. railroads, which were among the first to enter the competitive long-distance field when they sought new uses for rights of way as rail traffic declined. US Sprint, for instance, traces its origins to a company set up by the Southern Pacific railroad.

John Mahoney, regional director for Nynex Network Systems Co., a Brussels-based subsidiary of Nynex, declined to predict whether the Hermes network would become more than a private system for the railroads. But he noted that "there is a great deal of change going on now in Europe."

Iain Vallance, chairman of British Telecom, predicted outright that the system would have wider use. "When customers want it and the companies can provide it economically, then sooner or later the companies will provide it... . Sooner or later, I think European governments will let it happen."