Story highlights Gingrich says "we're going to keep going"

Virginia attorney general indicates candidates may appeal

Four candidates "played the game, lost, and then complained," judge rules

Perry, Gingrich, Santorum and Huntsman won't be on Virginia primary ballot

A federal judge on Friday ruled against four Republican presidential candidates seeking a spot on Virginia's March 6 primary ballot, saying they waited too long to file their claims.

Left off the ballot are Texas Gov. Rick Perry, former House Speaker Newt Gingrich, former U.S Sen. Rick Santorum of Pennsylvania and former Utah Gov. Jon Huntsman.

The four candidates challenged the state's residency requirements for those seeking to circulate ballot petitions, but Judge John Gibney ruled against the challenge.

The four candidates "knew the rules in Virginia many months ago," the judge wrote in his ruling. "In essence, they played the game, lost, and then complained that the rules were unfair."

Gibney, a 2010 appointee to the federal bench in Richmond by President Barack Obama, said his ruling denied the candidates' motion for a preliminary injunction.

"The plaintiffs have waited too long to file, and the doctrine of laches bars their claim," Gibney wrote.

"The Commonwealth is far along in the electoral process. The primary election is so close that the plaintiffs cannot gather the requisite signatures to get on the ballot. To place the plaintiffs on the ballot would deprive Virginia of its rights not only to conduct the primary in an orderly way but also to insist that a candidate show broad support," the judge wrote.

Two other candidates did qualify for the GOP primary: former Massachusetts Gov. Mitt Romney and Rep. Ron Paul of Texas.

Gingrich told CNN's Erin Burnett the decision means "voters of Virginia have been denied five candidacies that ought to be on there."

"We're going to keep going," Gingrich said. "It just means that I have to ultimately, coming out of winning South Carolina (and) winning Florida, I'll have to beat Romney in enough extra states to make up for it."

The Paul camp welcomed the decision and said the campaign is now a "two-man race."

"Nothing new was learned here today, as the Virginia ruling merely confirms the suspicions of what many people feel about the viability of Perry, Gingrich, Huntsman, and Santorum," national campaign chairman Jesse Benton said in a statement.

Virginia Attorney General Ken Cuccinelli said he didn't expect the ruling to be the last word in the ongoing case, which is expected to be appealed to a federal appeals court in Richmond.

"I am pleased that the district court is allowing Virginia's orderly election process to move forward," Cuccinelli said in a statement. "The ruling today dealt only with the request for a preliminary injunction. The litigation is ongoing."

Virginia holds its Republican primary on March 6, Super Tuesday. At stake in the primary are Virginia's 49 delegates.

Virginia state law specifically prohibits voters from writing in candidates not on the ballot in primary elections.

Huntsman and Santorum did not file petitions with the Virginia State Board of Elections that would have allowed them a place in the state's primary. Gingrich and Perry filed petitions that were rejected by the Republican Party of Virginia for not meeting requirements.

The four candidates sued the state's board of elections over laws they claimed were unconstitutional.

Virginia requires candidates to obtain 10,000 signatures from registered voters in the state, with at least 400 signatures coming from each of the state's 11 congressional districts.