A Montgomery County Circuit judge refused yesterday to order two self-serve gas stations to raise their prices, saying they had not violated state fair-sales laws by selling at unfairly low prices, as four full-serve competitors had claimed.

The four full-serve stations contended that the owners of an Aspen Hill Arco station and a Scot station on Viers Mill Road had been trying to drive them out of business by selling at a loss. They argued that, under state law, the defendants should be forced to sell gas for at least cost, plus another 7 percent to allow for transportation and business expenses.

Circuit Judge Calvin R. Sanders, however, ruled that the self-serve stations had not sold below cost and did not have to use a 7 percent markup. "It was not the intention of the legislature to permit price-fixing or to interfere with the normal and free competition among sellers," he wrote.

Attorney Maurice J. Beggiani, who represented Aspen Hill Arco, said Sanders' decision "is truly in the public's interest and in the interest of free competition between independent gas dealers . . . . This will keep prices down for the general public."

Elbert R. Shore, representing the full-service stations, said a victory for his clients would have meant higher gasoline prices, "but at the same time, it helps to preserve competition." As a result of yesterday's decision, he said, "more stations are going to phase out their service and mechanical operations and become 'gas-and-go,' and consumers are ultimately going to be hurt."