A grueling, often nasty campaign for New Mexico's 1st Congressional District neared its end Tuesday with Patricia Madrid and incumbent Heather Wilson battling down to the wire.

But it was down-to-the-wire and razor close. With 94 percent of precincts reporting, Madrid held a tiny advantage with 50.1 percent of the vote compared with 49.9 percent for Wilson — a difference of 368 votes.

"We have to wait a little bit longer," Madrid told cheering Democratic supporters shortly before midnight.

Check Your State, Check Your Race by clicking BALANCE OF POWER dropdown menu above.

A win for Madrid, New Mexico's attorney general, would make her the first Democrat to win and the first from either party to unseat an incumbent since the Albuquerque-area district was created in 1968.

But Wilson, a Republican seeking a fifth term, has survived close contests before in her Democratic-leaning district.

Wilson had to overcome public distaste for the war in Iraq and GOP scandals in Congress.

"It is time for change, but you can't change Washington until you change the people you send to Washington," Madrid said during the race.

Elsewhere in New Mexico, Republican Steve Pearce earned a third term representing the 2nd District over Democratic challenger Al Kissling and Democrat Tom Udall easily won a fifth term over GOP challenger Ron Dolin in the 3rd District.

With 46 percent of 2nd District precincts reporting, Pearce had 63 percent of the vote compared with 36 percent for Kissling. And in the 3rd District with 57 percent of precincts reporting, Udall had 70 percent of the vote compared with 29 percent for Dolin.

The Madrid-Wilson race was a nasty campaign that included months of caustic television attack advertisements aired by both sides.

It was one of New Mexico's most bitter and expensive campaigns, with the candidates and their outside allies combining to spend more than $11.5 million — including $3.5 million by the national parties in the closing weeks.

As voters went to the polls, the race remained a tossup. An Albuquerque Journal poll published Sunday showed Madrid favored by 49 percent of likely voters compared with 45 percent for Wilson; 6 percent were undecided. The poll carried a margin of error of plus or minus 4.4 percentage points, meaning the race was statistically tied.

Madrid, working from the national Democratic Party's playbook, framed the race as a referendum on the Iraq war and the Bush administration's national security policies. She went after Wilson for voting to authorize force in Iraq.

The strategy appeared to be warranted by polls that found only 38 percent of Albuquerque voters approve of Bush, the same percentage as nationwide. Across New Mexico, 52 percent of those polled thought the Iraq war was a mistake.

Nationally, Democrats targeted Wilson in their bid to pick up 15 seats needed to seize control in the House.

Other than a visit by President Bush at a fundraiser early in the campaign, Wilson distanced herself from the administration. She portrayed herself as independent and focused on local issues like defense spending — critical for Kirtland Air Force Base and Sandia National Laboratories.

Wilson, a Rhodes Scholar and Air Force veteran known for sometimes bucking her party, also touted her support for embryonic stem-cell research and reminded voters how she challenged the administration on electronic wiretapping programs.

The seat was established in 1968 and has been held by Republicans Manuel Lujan Jr., Steve Schiff and Wilson. Its heart is Albuquerque and Bernalillo County, where Al Gore and John Kerry won in the past two presidential races.

Throughout the district, Democrats hold an advantage of some 35,000 voters — about 46 percent to 35 percent.

Click here to visit YOU DECIDE 2006, FOXNews.com's complete election center.