President Bush used his annual Independence Day speech to pay homage to America's fighting men and women and to urge the nation to remain firmly behind the effort in Iraq.

In an appearance at West Virginia University, he acknowledged that continued violence in Iraq has been "hard for a compassionate nation to watch." But he compared today's hardships to those faced by Americans of past generations, including those who declared the country independent and fought the Revolutionary War 229 years ago.

"During that hot summer in Philadelphia more than 200 years ago, from our desperate fight for independence to the darkest days of a civil war, to the hard-fought battles of the 20th century, there were many chances to lose our heart, our nerve or our way," he said. "But Americans have always held firm, because we have always believed in certain truths: We know that the freedom we defend is meant for all men and women, and for all times."

Bush spoke to an outdoor audience of about 2,000 people -- restricted to ticket-holders. Outside the flag-and-bunting-draped event area, a knot of protesters gathered, carrying signs reading "Bush Lied" and chanting "We support our troops, not the president" and "Peace is patriotic."

This marked the third Fourth of July holiday in four years he has celebrated in West Virginia, and the second in a row. Last year, in the midst of his reelection campaign, Bush commemorated the day with an address at the state Capitol in Charleston.

In the year since, the president won reelection and Iraqis went to the polls in their first national election of the post-Saddam Hussein era. At the same time, violence in the country has continued. More than 870 U.S. troops -- including seven West Virginians -- have been killed in Iraq since the president's last Fourth of July address, and recent polls have shown weakening public support for the war. As a result, White House aides have said, Bush has concluded he must do more to refocus the nation's attention on the mission and its stakes.

Repeating themes he struck last week in a nationally televised speech before soldiers at Fort Bragg, N.C., Bush argued that Iraq has become a main arena in the larger battle against terrorism. "We're taking the fight to the terrorists abroad so we do not have to face them here at home," he said.

Speaking in front of a military band and the university's red-brick Woodburn Hall, he vowed that Iraqi insurgents who "continue to kill in the hope that they will break the resolve of the American people" will fail.

"We know that when the work is hard, the proper response is not retreat; it is courage," he said.

Bush said Americans will stay in Iraq until the country's security forces are capable of defending Iraq on their own. "Our strategy can be summed up this way -- as Iraqis stand up, we will stand down and then our troops can come home to a proud and grateful nation," he said.

In all, 13 West Virginians have been killed in Iraq since the war began. A sailor from the state was also one of 16 troops killed last week when a MH-47 Chinook helicopter crashed in eastern Afghanistan.