A federal judge in Washington Friday ordered three major international airlines each to pay a $30,000 fine after they pleaded no contest to charges they conspired to fix the price of military excursion fares between West Germany and the United States.

Judge Thomas A. Flannery imposed the penalties against Pan American World Airways. Trans World Airlines and Lufthansa German Airlines. The maximum fine for the violations was $50,000.

At the same hearing. Flannery was informed that the airlines and the government have a reached a settlement agreement in a civil suit filed by the government to block the airlines from similar conduct in the future.Flannery must approve the agreement.

The airlines were charged in an indictment last February of agreeing in 1972 to fix the price of the excursion fares paid by American soldiers and their families who traveled between the two countries.

The government contended that the agreement did not have the approval of the Civil Aeronautics Board and the International Air Transport Association.

The effect of the conspiracy was to deprive military men and their families of the benefits of "free and open competition," the government contended.

The indictment was the first criminal antitrust action that involved airline rate fixing. Justice Department officials said.