DENVER  Tens of thousands of Coloradans who had been removed from the state’s voter rolls will be allowed to vote in next week’s election and given extra protections so their ballots are counted, under an agreement reached late Wednesday in federal court here.

The voters’ names had been removed by Mike Coffman, the Colorado secretary of state, who said he did so because the voters had moved out of state or were listed more than once on the rolls. But Mr. Coffman was sued by a coalition of voting rights and other groups who said such purges were generally prohibited by federal law within 90 days of an election.

Under the agreement, voters removed from the rolls will be permitted to cast provisional ballots, and those ballots will be counted unless election officials can prove the voters were not eligible. To strike such ballots, county election officials must conduct an extensive records review on each one, a decision that must then be reviewed by Mr. Coffman’s office.

“This is unprecedented,” said Elizabeth Westfall, a lawyer for the Advancement Project, a civil rights group that helped file the lawsuit. “We are really thrilled that there will be this degree of unprecedented scrutiny and protection for these purged voters when they cast their provisional ballots.”