Under New Hampshire state law, communities with fewer than 100 voters can get permission to open their polls at midnight and close them as soon as all registered voters have cast their ballots. On Feb. 9, three tiny northern towns will share the spotlight when their residents cast the first ballots in the first-in-the-nation presidential primary:

HART’S LOCATION

Nestled in the middle of the White Mountain National Forest, Hart’s Location first hosted midnight voting in 1948 but gave it up after the 1964 election when residents grew weary of the late hours and media frenzy every four years. Energized with new blood, town residents revived the tradition in 1996.

In the most recent presidential primary, Mitt Romney won the 2012 Republican contest with five votes. President Barack Obama won all 10 of the town’s Democratic votes. It’s unclear how many people will cast ballots at the town hall this year. Hart’s Location has 41 registered voters and had received five absentee ballots as of Friday night, according to town clerk Katie Landry.

DIXVILLE:

Dixville, about 20 miles from the Canadian border, exists as a town only for voting purposes. Almost all of its voters are employees of the Balsams Grant Resort Hotel, which closed in 2011 but is currently undergoing a major overhaul under new owners.

Former owner Neil Tillotson started the midnight voting tradition in 1960, likely at the suggestion of a news photographer looking for an advantage in getting his pictures out to newspapers ahead of his rivals. For many years, voters cast their ballots in individual booths in the hotel’s posh ballot room. Because of the renovations, the nine current residents will vote in another building on the property, the Hale House.

In 2012, there was a tie for first place on the Republican side, with Romney and Jon Huntsman getting two votes apiece. All three Democrats voted for Obama.

Millsfield is making a comeback this year, though it’s unclear just when the town last voted at midnight or when its tradition started. According to a 1952 article in Time magazine, eight residents voted at midnight during the general election that year. Town Selectman Wayne Urso says he believes early voting happened sometime before and after that election, but there’s no hard evidence.

This year, there are 22 registered voters. About 14 are expected to vote in person on primary day, with the rest voting by absentee ballot.

Ron Paul was the victor in the 2012 GOP primary with eight of 14 votes. Obama won the Democratic primary with two votes, with one Democrat voting for Republican Newt Gingrich.