A judge on Wednesday ordered all provisional ballots to be counted in the still-undecided 7th Congressional District, a small victory for the Democratic candidate trailing in the race.

Republican Bob Beauprez is 386 votes ahead of Democrat Mike Feeley in the contest to become the first representative of the new district in the metropolitan Denver area.

Three counties have yet to certify their provisional ballots, cast by voters whose names did not appear on official voter-registration rolls. It was the state's first election to feature the special ballots.

Feeley filed a lawsuit saying election officials in Arapahoe, Jefferson and Adams counties did not use the same standards to decide whether the ballots were valid.

One county counted all the provisional ballots whose voters were found to be qualified; the two others threw out all ballots whose voters failed to check a box and explain why they voted under the special circumstances.

Denver District Judge William Robbins ruled that all the ballots cast by qualified voters should be counted, explanation or no.

"The short delay in completing the count until the validity of these ballots is determined harms no party to this election,'' the judge wrote.

Results were expected to be announced Thursday.

About 2,300 provisional ballots cast in the counties were expected to affect the 7th District race. Feeley's advisers said the decision will affect at most 158 provisional ballots that were not being counted in Adams and Arapahoe counties.

Feeley said the court decision will probably result in a recount mandated by state law.

"We wanted to make sure the votes were counted. It's certainly about as close as it can get,'' he said.

Republican Party executive director Alan Philp said the party has not decided whether to appeal to the state Supreme Court within the three-day limit.

"We are disappointed in the court's opinion. We are weighing our options and waiting to see if the secretary of state is going to appeal,'' Philp said.

The ruling applies to all 64 counties statewide and could affect results in several local races.