A Republican former state lawmaker claimed a seat in Congress on Tuesday by narrowly defeating a veteran of the Iraq war who drew national attention to the race with his military service and harsh criticism of President Bush.

With all precincts reporting, Jean Schmidt had 52 percent, or 57,974 votes, compared with Democrat Paul Hackett's 48 percent, or 54,401 votes. Schmidt's margin of victory was 3,573 votes out of 112,375 cast.

Schmidt, 53, will succeed Republican Rob Portman, who stepped down this year after being named U.S. trade representative by Bush. Portman held the seat for 12 years, consistently winning more than 70 percent of the vote in the Cincinnati area district.

"We began this race way back in late March, and no one had thought we'd be the focus of the national media or be the so-called first test of the Republican Party and the Bush mandate. Well, ladies and gentlemen, we passed that test," Schmidt said.

Democrats had viewed the race as a bellwether for 2006, saying that a strong showing by Hackett in such a heavily GOP district would be a good sign for them in the midterm elections.

In Ohio, Schmidt billed herself as an experienced leader more in tune with the district than Hackett. She is the first woman elected in the 2nd Congressional District.

Hackett, 43, is a lawyer and Marine reservist who recently completed a seven-month tour. He was vying to become the first combat veteran of the Iraq war to serve in Congress. He drew attention to the race by calling Bush's July 2003 "bring 'em on" comment about Iraqi insurgents "the most incredibly stupid comment I've ever heard a president of the United States make." Hackett said it cheered the enemy.

Schmidt consistently supported Bush on the war and said she shares the "moral values" of the district with her opposition to abortion and to same-sex marriage.

In other races Tuesday, Detroit Mayor Kwame M. Kilpatrick and former deputy mayor Freman Hendrix emerged from a 12-candidate mayoral primary to advance to the general election. Hendrix had a double-digit lead over Kilpatrick with 45 percent of the vote counted.

Kilpatrick was heralded as Detroit's next great hope when he was elected four years ago at the age of 31, but his term has been marred by a $300 million budget deficit, scrutiny of his running up huge bills on a city credit card and the city's lease of a luxury SUV for his family.