BOSTON (AP) — The Massachusetts secretary of state has ordered all ballots in a congressional primary race sealed and locked away in anticipation of a recount in the too-close-to-call election.

William Galvin says the two front-runners in the field of 10 candidates for the Democratic nomination in the congressional district including parts of northeastern and central Massachusetts were separated by just a few dozen votes Wednesday morning.

Lori Trahan declared victory early Wednesday, but Dan Koh released a statement saying it may be days before the race is decided.

Trahan had garnered 52 more votes than Koh with all precincts reporting, according to the Associated Press tally.

The candidates are vying to replace Democratic U.S. Rep. Niki Tsongas, who is not running for re-election.