Speaker John Boehner, R-Ohio, presents a photo id as he gets his ballot to vote, Tuesday, Nov. 6, 2012, at Ronald Reagan Lodge in West Chester, Ohio. (Al Behrman/AP)

Republicans won enough crucial races Tuesday to retain control of the House of Representatives, beating back a strong Democratic challenge and allowing the GOP to keep pushing an agenda of fiscal austerity.

The GOP was on track to hold on to a strong majority in the chamber, ensuring that House Speaker John A. Boehner (Ohio) remains the dominant Republican legislator in negotiations over government spending in the months ahead. With results tallied in much of the country, Republicans appeared close to maintaining at least a 20-seat margin.

The continued GOP dominance in the House probably will lead to renewed clashes with Senate Democrats, with whom Boehner’s conservative caucus feuded for the past two years in budget battles that brought the federal government to the brink of defaulting on its debt.

Those partisan showdowns made the 112th Congress the least-popular in history. Although that seemed to bode ill for incumbents — several in both parties fell to primary challengers in the spring and summer — voters Tuesday followed an old axiom: They loathe Congress but support their local congressman.

Many incumbents survived because of a redistricting process that left a record-low number of competitive seats, cloistering Republicans and Democrats together into geographically odd — but politically homogenous — districts. In Florida, where population growth boosted the delegation to 27 seats, only six races were considered competitive entering Election Day.

The most outspoken partisan from Florida, freshman Rep. Allen B. West (R), was locked in a tight battle early Wednesday, trailing by less than 1,000 votes, even though he moved into a more Republican-leaning district where his controversial statements were considered less inflammatory. But Alan Grayson — a liberal firebrand tossed out in the 2010 wave — was set to return to the House from a new district that tilts heavily toward Democrats.

In Chicago’s northwest suburbs, Iraq war veteran and former Obama administration official Tammy Duckworth knocked off Rep. Joe Walsh, an outspoken conservative who ran an aggressive campaign. By early Wednesday, Walsh was one of just nine freshman Republicans to have been defeated, although several more trailed.

In Minnesota, Rep. Michele Bachmann, who founded the Tea Party Caucus months before the 2010 midterms, appeared to have won a narrow victory over Democrat Jim Graves, a leading businessman. With more than 98 percent of precincts reporting, Bachmann was leading Graves by fewer than 3,300 votes.

‘Tea party Congress’?

Although Democrats, who needed a net gain of 25 seats to reclaim the majority, spent hundreds of millions of dollars attacking the “tea party Congress,” early returns showed they were not making enough inroads in the eastern half of the nation to make up that ground. Veteran Democrats were knocked off in Kentucky and New York, while other touted challengers fell short.

After casting his ballot in the southwestern Ohio district he has represented for 22 years, Boehner vowed to continue the conservative track that House Republicans have taken the past two years, arguing the results validated their approach.

“For two years, our majority in the House has been the primary line of defense for the American people against a government that spends too much, taxes too much, and borrows too much. . . . The American people want solutions — and tonight, they’ve responded by renewing our majority,” Boehner said in a victory address in Washington.

The Democratic defeat left in doubt the political future of House Minority Leader Nancy Pelosi (Calif.), who for months had publicly and privately predicted huge gains for Democrats and a possible recapture of the chamber’s majority.

Pelosi allies have signaled that she may relinquish her leadership role after President Obama’s reelection and a string of victories that ensured Democrats would retain control of the Senate.

House Democrats declared “the end of the tea party” before election returns began coming in Tuesday night. Their strategists pointed to the difficult reelection fights for several of the most outspoken conservatives in the House, including Bachmann, Walsh and West.

Democrats also noted that many others who rode in on tea party support two years ago tried to reposition themselves as mainstream Republicans to face this year’s electorate.

“House Republican incumbents — and their candidates — are running as far away from the Tea Party as they can,” the Democratic Congressional Campaign Committee declared in its memo.

Effect of redistricting

The GOP performance defied early expectations that Republicans’ historic 2010 gains would be followed by steep losses this November — the historical pattern after large wave elections such as the 63-seat gain for Republicans two years ago.

Experts have noted that the Republican strategy after 2010 was to use the decennial process of redistricting to fortify as many of the 87 freshmen as possible for the 2012 races. Rather than trying to seek large gains, Boehner’s team worked with GOP-controlled state legislatures, which draw district maps, to shore up those freshmen in new districts.

Of the more than 80 Republican freshmen standing for reelection, more than half had been reelected by late Tuesday.

Both parties hoped to notch several historical firsts in the election.

In the North Shore of Massachusetts, former state senator Richard Tisei, who sought to become the first Republican to win as an openly gay candidate, lost to Rep. John F. Tierney, a veteran, scandal-plagued incumbent.

In Utah, Mia Love, the mayor of Saratoga Springs, was clinging to a 700-vote lead over Rep. Jim Matheson in her effort to become the first black Republican woman elected to Congress.

In Hawaii, Democrat Tulsi Gabbard was the favorite to win an open seat and become the first Hindu American in Congress.

Gabbard’s expected victory is part of the continuing diversification of House Democrats that most believe will leave their caucus of close to 200 members with a majority of women and minorities. If that occurs, it will be the first time in history that a House or Senate party caucus does not have a white male majority.

Some candidates won despite their scandals.

In Chicago, Rep. Jesse L. Jackson Jr. (D-Ill.), who ran a vigorous primary campaign in a newly drawn district that went deep into the suburbs beyond his South Side base, has not been seen in public since early June, when he entered a treatment facility for what his doctors said was bipolar disorder. He was easily reelected in his heavily Democratic district, but his aides have still not signaled when he will return to the Capitol.

In Staten Island, freshman Rep. Michael G. Grimm (R) won reelection despite an active FBI investigation into his campaign finances from his 2010 race. In the last 10 days of the campaign, after Hurricane Sandy’s destruction of his New York district, Grimm was a frequent presence on the streets and in media appearances pleading for help.

The redistricting process also created several incumbent-vs.-incumbent races, including a pivotal race in Cleveland’s suburbs pitting freshman Rep. James B. Renacci (R) against Rep. Betty Sutton (D). Renacci, an entrepreneur who has owned several businesses, beat Sutton, a member of the moderate Blue Dog Coalition.

In a peculiar quirk of California’s new balloting rules, two veteran liberal Democrats — Reps. Howard L. Berman and Brad Sherman — were thrown into a general election race against one another. Even though it will not impact the majority, they engaged in one of the most expensive races in the nation. Sherman took an early lead in the count, 58 percent to 41 percent.

Julie Tate contributed to this report