A Fairfax Circuit Court judge yesterday allowed Fairfax County to begin enforcing an ordinance on Thursday requiring stores to pay at least a 5-cent refund on all used beverage cans and bottles and stop selling poptop cans.

The ordinance upheld by Judge James Keight is intended to cut down on the costly clearn-up of bottles and cans that motorists and others often discard along highways and others and in parks.

Fairfax will be the first major Washington-area jurisdiction to have such a law, although the city of Bowie also has an anti-throwaway bottle ordinance in effect. Montgomery County has passed a bottle ordinance requiring a 5-cent deposit on soft drink and beer containers beginning next Jan. 1, while Loudoun County is in the process of drafting a law banning non-returnable containers.

The Fairfax law states tht throw-away cans and bottles for all carbonated, nonalcoholic beverages sold in the county must be marked with a sticker saying "Washington Metropolitan Area, 5 cents deposit."

The idea behind the law is that since the used containers will be worth 5 cents, consumers will return the marked containers and regular returnable bottles to the stores to collect the refunds. The retailers must then pay consumers at least 5 cents for the bottles or cans when they are returned.

The ordinance does not affect any other Northern Virginia jurisdiction - including Fairfax City, which is surrounded geographically by the county.

Several grocery chain-store spokesmen and county officials said yesterday they are uncertain about what will happen Thursday and how well the ordinance will be enforced.

Distributors of Coca-Cola and Pepsi-Cola, both plaintiffs in the suit seeking to block implementation of the ordinance said they will not put and therefore will not sell nonreturnable bottles and cans in Fairfax. Spokesmen for the two companies said it would not be worth the expense of about $100,000 to mark the containers.

Spokesmen for Safeway, Giant and A & P stores said they would comply with the law, but did not know how they would do it. A 7-Eleven store spokesman said the chain of conveniecne stores will not mark the non-returnable beverage containers and will clear them from their shelves Wednesday night.

Assistant Fairfax County Attorney Robert F. Flinn said the law was not clear on whether the distributors or retailers of the beverages would be required to mark the containers.

County Police Col. Kenneth R. Wilson, who is overseeing a two-man Wilson, who is overseeing a two-man team to enforce the ordinance, said beginning Thursday the officers will spot check the county's 199 major chain stores selling beverages and the numerous "mom and pop" stores. Wilson said no warnings will be given. Store owners face a possible fine of $500 and six months in jail for each day they do not comply with the ordinance.

"I hope the stores will comply with this ordinance," Wilson said. "Those that don't, we will cite them and see them in court."

Wilson said he is not sure of all the details of the planned enforcement. "I wouldn't want to cite someone for having one (pop-top) can. We will be looking at the situation Thursday," he said.

A spokesman for the Pepsi-Cola distributors said Keith's decisions will be appealed to the Virginia Supreme Court, probably today.

In their original suit, six soft drink distributors and Charles Tabler owner of the Foodarama Supermarket in McLean, said impletation of the some provisions of the law are vague and that it is unfair because alcoholic beverages and noncarbonated beverages are not covered by the law.

The county supervisors first passed the ordinance, in December, 1975, and included alcoholic beverages. But the law was emended in Juen to exclude alcoholic beverages because their sale is controlled by the state Alcoholic Beverage Control Board.

In his three-page opinion, Keith ruled that ". . . the ordinance does not appear to be unconstitutional on its face . . ."

The distributors and Tabler also said they did not have time to comply with the ordinance, even though it was passed 20 months ago, and would be irreparably harmed if it were enforced on Thursday.