Vote tallies were still coming in Wednesday morning, more than eight hours after polls were scheduled to close -- a situation caused by equipment glitches, high turnout and a recount in Yellowstone County because of errors there.
The race was being watched by a nation waiting to see which party would take control of the U.S. Senate.
With 90 percent of precincts reporting, Tester had 173,259 votes, or 49 percent, and Burns had 171,207 votes, or 48 percent. Libertarian Stan Jones had 9,061 votes, or 3 percent.
Tester went to sleep not knowing if he would win. His spokesman, Matt McKenna, said the race would be resolved Wednesday.
"We are winning this race and we will win this race but it will be (Wednesday)" McKenna said early Wednesday.
The Burns campaign said they believe big turnout in Republican precincts would help them as the late votes were counted. Supporters cheered as late results showed Burns cutting into Tester's lead.
Control of the U.S. Senate hung in the balance early Wednesday morning -- with both Virginia and Montana yet to be called. Democrats needed to win both races to hold a majority.
Tester predicted a win as late results rolled in.
"I can guarantee you this, it's going to be worth the wait," he told supporters late in the night.
A number of counties stayed open late to deal with long lines of voters seeking to register and vote on the same day. Gallatin County was still registering voters four hours after the polls closed at 8 p.m.
McKenna said the Tester campaign has lawyers on the ground but "as of now we are not seeing any irregularities that lead us to believe there is any voter fraud."
He said the campaign is confident Tester is winning in Yellowstone, a key conservative-leaning county, and officials there have told him that the vote count will not significantly change from numbers posted earlier in the evening.
"This is not Florida," he said. "These are just ballots that are slow to be counted."
Democratic Gov. Brian Schweitzer, in Great Falls with Tester, predicted a win for the Big Sandy farmer because "all the things we've done in the last few years have given Democrats a better brand name."
Democratic U.S. Sen. Max Baucus, also waiting with Tester for returns, said "this is a year of change, Montanans want change."
Burns called in last-minute visits from GOP big guns including the president and vice president, hoping to give him the boost he needs against Tester.
Burns, 71, who was first elected in a 1988 upset as the folksy, backslapping Washington outsider, now finds himself as one of the most vulnerable Senate incumbents. His ties to convicted lobbyist Jack Abramoff and his own verbal gaffes -- including an incident this summer when he cursed at firefighters at the airport in Billings -- have left him with some of his lowest approval ratings of any election.
His race against Tester has been one of the most closely watched this year, with Democrats hoping Burns' own troubles, coupled with President Bush's low approval ratings, would translate into Democratic gains in Congress.
Most polls in the final weeks of the campaign indicate the race too close to call. But Burns continues to garner less than 50 percent support, typically a big sign of trouble for an incumbent.
Tester, the state Senate president and a farmer from Big Sandy, hammered Burns throughout the campaign season for his ties to Abramoff and what Tester called the "culture of corruption" in Washington. Burns was a top recipient of campaign contributions from Abramoff and his clients. He since returned or donated about $150,000, and has maintained he did nothing wrong and was never influenced by Abramoff.
Tester, 50, surprised many in the state when he beat a better financed and better known Democrat in the party's June primary.
Copyright © 2006 ABC News Internet Ventures