WASHINGTON – Thrust into the midst of the midterm election campaign, Sen. John Kerry apologized Wednesday to “any service member, family member or American” offended by remarks deemed by Republicans and Democrats alike to be insulting to U.S. forces in Iraq.

Six days before the election, the 2004 Democratic presidential nominee said he sincerely regretted that his words at Pasadena City College on Monday were “misinterpreted to imply anything negative about those in uniform.”

In a brief statement, Kerry attacked President Bush for a “failed security policy.” Yet his apology, issued after prominent Democrats had urged him to cancel public appearances, was designed to quell a controversy that party leaders feared would stall their drive for big gains on Tuesday.

With polls showing the public opposed to the war in Iraq, Democrats have expressed increasing optimism in recent days that they will gain the 15 seats they need to win control of the House. They must pick up six seats to win the Senate, a taller challenge.

Kerry beat a grudging retreat in his return to the national campaign spotlight.

Earlier, on the radio program “Imus in the Morning,” the Massachusetts senator said he was “sorry about a botched joke” about Bush. He heaped praise on the troops, adamantly accused Republicans of twisting his words and said it was the commander in chief and his aides who “owe America an apology for this disaster in Iraq.”

Democrats cringed, though, at the prospect of the Massachusetts senator becoming the face of the party for the second consecutive national campaign. “No one wants to have the 2004 election replayed,” said Sen. Hillary Rodham Clinton, D-N.Y., like Kerry, a potential contender for the 2008 nomination.

Congressional candidates in Iowa and Minnesota swiftly made plain that Kerry was no longer welcome to appear at scheduled rallies, and the senator scrapped an appearance in Philadelphia.

“It was a real dumb thing to say. He should say sorry,” said Democrat Claire McCaskill, running in a tight Senate campaign in Missouri.

The White House accepted Kerry’s statement. “Senator Kerry’s apology to the troops for his insulting comments came late but it was the right thing to do,” said Dana Perino, deputy press secretary.

With Bush showing the way, Republicans had worked energetically to turn Kerry into an all-purpose target in a campaign that has long loomed as a loser for the GOP – much as they ridiculed him two years ago on their way to electoral gains.

“Anybody who is in a position to serve this country ought to understand the consequences of words. … We’ve got incredible people in our military, and they deserve full praise and full support of this government,” Bush said in an interview with conservative talk-radio personality Rush Limbaugh.

“Of course, now Senator Kerry says he was just making a joke, and he botched it up,” Vice President Dick Cheney said in remarks prepared for a campaign appearance in Montana. “I guess we didn’t get the nuance. He was for the joke before he was against it.”

The jab was designed to recall Kerry’s inartful comment from the last election that he had voted for $87 billion for the wars in Iraq and Afghanistan before he voted against it.

Two days ago, Kerry stirred controversy when he told a group of Pasadena City College students that individuals who don’t study hard and do their homework would likely “get stuck in Iraq.” Aides said the senator had mistakenly dropped one word from his prepared remarks, which was originally written to say “you end up getting us stuck in a war in Iraq.” In that context, they said, it was clear Kerry was referring to Bush, not to the troops.

The speed with which party leaders and candidates shoved Kerry aside underscored the difficulty he will face running for the nomination after leading the party to defeat in 2004. He also had the misfortune of being disinvited from an appearance in Iowa – the state whose caucuses will begin the delegate selection process for the White House race.

Party leaders were far more focused on the election in six days time, rather than the one two years away.

Democratic officials said the leaders of the party’s campaign committees had relayed word to Kerry for him to avoid becoming a distraction. Aides to Sen. Chuck Schumer, D-N.Y., and Rep. Rahm Emanuel, D-Ill., chairmen of the Senate and House campaign committees, said they would not comment on any possible telephone conversations that had occurred.

Democrats have privately told outsiders they have locked up 10 of the 15 GOP-held seats they need. Polls indicate several dozen additional races are competitive, far more than appeared possible at the outset of the campaign, and too many for Republican comfort at a time of opposition to the war and low presidential approval ratings at home.

In the Senate, Democrats claim they are on track to defeat four Republican incumbents, including Sens. Mike DeWine in Ohio, Rick Santorum in Pennsylvania, Lincoln Chafee in Rhode Island and Conrad Burns in Montana. Republicans tacitly concede DeWine and Santorum appear headed for defeat, but the party’s senatorial committee has launched television commercials in the campaign’s final week in an attempt to save Chafee and Burns.

Barring a dramatic shift in opinion in the campaign’s final days, that leaves only a handful of races in significant doubt, principally three Republican-held seats in Tennessee, Missouri and Virginia.