WASHINGTON (CNN) -- The Justice Department has approved a law that calls for New Hampshire voters to provide photo identification when they go to the polls.

Approval of the law, which requires the use of government-issued photos, was announced in a letter from T. Christian Herren Jr., head of the Voting Section in the Justice Department's Civil Rights Division, sent to attorneys for the state Tuesday.

Political observers consider New Hampshire important because it is a battleground state, where the race between President Obama and Republican nominee Mitt Romney is expected to be close.

Under the new law, which is being phased in over a year, voters who do not have photo identification at the polls will still be allowed to vote after executing what the state calls a challenged voter affidavit. Voters who fill out the affidavit will receive a letter requesting confirmation of voting. If there is no response within a month, the state may investigate to determine if voting fraud occurred. After September 1, 2013, voters must have photo identification.

The Justice Department has challenged laws requiring photo IDs in Texas and South Carolina, which have much larger numbers of minority voters. A three-judge panel has upheld the Justice Department challenge in Texas, and the South Carolina case is now before another three-judge panel in Washington.