BLACKBURN, England — Heckled during a visit to Washington’s closest ally, Secretary of State Condoleezza Rice said Friday the United States has made thousands of mistakes but is pursuing worthy goals in Iraq.

“I know we’ve made tactical errors, thousands of them I’m sure,” Rice said at a foreign policy gathering “But history will judge whether the larger aims and decisions were correct.”

The top U.S. diplomat also said international sanctions must be an option if the nuclear standoff with Iran continues. That made explicit what had been an unspoken threat now that Iran’s case is before the United Nations Security Council.

The United States has avoided for months talking about economic sanctions or other tough consequences for Iran if it does not comply, out of deference to allies and partners who oppose any punitive moves.

Rice defended the three-year-old Iraq war as the right way to rid the world of a threatening dictator and said Iraqis will make a success of their new democracy.

Britain has the second-largest contingent of troops in Iraq after the United States, and Prime Minister Tony Blair has stuck by President Bush despite widespread opposition to the war at home.

Songs and jeersRice met loud anti-war protests in the streets of this northern industrial town, including chants of “Hey, Condi, hey, how many kids did you kill today,” at one stop. At a Liverpool performing arts school once attended by Paul McCartney, one group of students sang for Rice while others booed her.

“People have a right to protest,” Rice told students at a Blackburn high school. It’s part of her job to listen, Rice said. “I’m not just going to visit places where people agree with me.”

Police estimated that 1,500 people crowded an intersection near a Liverpool Philharmonic concert Rice was attending. Amid a cacophony of whistles, steel drums and mock police sirens, they chanted songs accusing Rice of war crimes.

Police on horseback formed a barrier around a short stretch of road between the venue and Rice’s hotel, with other officers wearing riot helmets and body armor on standby, hidden from view down a side street.

The protests were the reverse of the warm reception Rice received last fall when she invited British Foreign Secretary Jack Straw for a down-home tour of her native Alabama.

Then, elderly white women lined up to shake the hand of a black native daughter made good, football fans cheered and the tantalizing possibility of a run for president — something she discounts — surrounded Rice.

To reciprocate, Straw is hosting Rice for two days in his largely working-class legislative district.

Academic viewpoint of war mistakesRice faced skeptical questions about U.S. involvement in Iraq at a question-and-answer session organized by the British foreign policy think tank Chatham House, including one about whether Washington had learned from its “mistakes over the past three years.”

Rice invoked her academic background to answer.

“I’m quite certain that there are going to be dissertations written about the mistakes of the Bush administration, and I will probably even oversee some of them when I go back to Stanford,” Rice said.

She batted away questions about whether she might run for president, saying she intends to return to teaching when she leaves government. Rice was a professor and provost at Stanford University before becoming Bush’s first-term national security adviser and second-term secretary of state.

Rice was a chief architect of the Iraq war, now in its fourth year. That history was at the center of the opposition she faced Friday, although demonstrators also objected to U.S. policies in pursuit of terrorists.

“Why should we be seen to endorse the policies of this woman?” demanded Jon Netton, 22, an acting student at Liverpool Institute for Performing Arts who said Rice’s visit had disrupted his practice schedule for an upcoming concert.

A planned visit to a mosque in Blackburn for Friday prayers was canceled because of concern that demonstrators would be too disruptive, mosque leaders said. About a quarter of the town is of South Asian heritage, and many are Muslims.

A prominent poet and actress pulled out of planned appearances at an evening concert in Liverpool in protest of U.S. policies.