DOVER, N.H. (Reuters) - Republican vice presidential nominee Sarah Palin on Wednesday likened efforts to revive the flagging U.S. economy to a “war” and said her running mate Sen. John McCain would prevail.

“We are going to win the economic war that we are in,” the Alaskan governor told several hundred supporters in Dover, New Hampshire in a speech amid mounting pressure on McCain’s campaign to sharpen its economic message.

McCain and his Democratic rival Sen. Barack Obama are courting New Hampshire’s famously independent voters, as shifting political allegiances in the state make it one of several toss-ups in the tight November 4 election.

Republican President George W. Bush won New Hampshire in 2000 by just 7,000 votes. In 2004, Democrat John Kerry carried the state by just 9,000 votes but lost the general election.

While only four electoral votes are at stake, the close fight for the 270 electoral votes needed to win the White House makes New Hampshire and other “swing” states such as Virginia, Nevada and Colorado critical to both Obama and McCain.

Democratic vice presidential nominee Sen. Joe Biden held a rally on Monday in Rochester, New Hampshire and Obama is scheduled to speak about the state of the U.S. economy in the southern town of Londonderry on Thursday.

Both campaigns are trying to persuade voters in the rural, mountainous state that they offer the best way to help struggling American workers.

Palin drew parallels between New Hampshire and Alaska, including a shared love of moose hunting, and said her state should adopt New Hampshire’s motto: “Live Free or Die.”

“I know that we can count on the good people in New Hampshire because you are a lot like the people of Alaska,” she said of the two states about 4,500 miles apart on the opposite sides of the continent.

As opinion polls suggest the race could tip decisively toward Obama, Palin cast her running-mate as the underdog who would tap voter anger over the economy, “corruption” in Washington and “voter fraud,” saying: “John McCain is going to turn that anger into action.”