The Soviet Union, in a stern warning tonight, said a threatened rail strike here "could touch on Poland's national and defense interests," and it accused the independent trade union movement of attempting to "maintain the tense situation in the country."

The official Soviet government newspaper Izvestia, in a Tass dispatch from Warsaw, said the strike might "disrupt railroad transit connections through Poland," a clear reference to Soviet interests in this key Eastern Bloc country's role in maintaining the Warsaw Pact's military capability.

Poland's rail lines are used by the Soviets to move troops and supplies for their forces in East Germany.

The Tass account was notable because it lodged its complaints directly at the Solidarity independent union movement for the first time by name. The dispatch quoted no Polish sources and thus departed from previous Soviet practice in reporting Poland's protracted labor troubles.

The industrial unrest took on increasingly political overtones here as the independent trade unions braced for a new confrontation with the governement over the issue of imprisoned activists.

Protests at the detention of a Solidarity volunteer coincided with a token strike by railway workers angry at the government's alleged failure to fulfill a pay agreement. In addition to the criticism from the Kremlin, the protests are likely to increase the concern felt about Solidarity's activities among hard-liners in the Polish Communist Party.

Tass asserted that Solidarity's goal was "to assume the right to fully dispose of the money made available by the Polish government for wage increases, without the participation of branch unions."

Soviet Communist Party dogma holds that trade unions must be under direct control of the party. Solidarity, which claims about 7 million members, thwarted this month to assert party supremacy over the union.

Talks were under way today in Wroclaw in an attempt to settle the dispute over the way a pay award of $60 million should be distributed among workers. If there is no satisfactory outcome, the railway workers have threatened to strike again Tuesday.

So far, the railway workers have limited the strike to prevent widespread inconvenience to the public or disruption in the movement of cargo around Poland. Today's two-hour strike affected only commuter services in Warsaw and the Baltic port of Gdansk.

Despite the Tass claims, there is no evidence yet that Poland's defense capability or Warsaw Pact commitments are likely to be affected by the dispute.

A more serious long-term threat to the communist authorities is Solidarity's readiness to resort to industrial action to protest the government's use of legal procedures in harassing activists or to force the dismissal of unpopular officials. The latest episode concerns the arrest of a Solidarity volunteer, Jan Naroznjak, following a police raid on the union's Warsaw office.

Two factories in Warsaw staged strikes today to protest against the prosecutor general's decision to investigate Naroznjak on charges of revealing state secrets. The classified document involved is a letter from the prosecutor to his deputies throughout Poland describing legal measures that could be taken against dissidents and union activists.

Solidarity also protested against the continuing detention of four other political activists arrested during the last three months. The statement claimed this contravened the agreement signed in Gdansk in August in which the government promised to release all political prisoners.

At a meeting of Solidarity's national coordinating committee last week, the organization's leader, Lech Walesa, said he would raise the case of imprisoned activists with the justice minister. If this failed to secure their release, he said, he would recommend strikes at major factories.

In recent weeks, Solidarity branches have demanded the dismissal of unpopular factory managers and regional officials.

The official Polish news agency PAP said today that the government had removed four district governors, including one in the southern town of Bielsko-Biala who had come under fire from the local chapter of Solidarity.