The rivals in the close Massachusetts governor's race clashed over taxes and their records on corporate accountability last night in the final television debate of an increasingly bitter and personal campaign.

Republican businessman Mitt Romney and state Treasurer Shannon O'Brien, a Democrat, kept their tempers and ultimately agreed to certify each other as being free from corruption, in the hour-long forum at Suffolk University in Boston. The debate was sponsored by the Boston Herald and moderated by Tim Russert of NBC News.

Going into the debate, both camps agreed that Romney and O'Brien had fought each other to a draw. Two public polls published yesterday gave O'Brien leads of 2 points and 6 points. But private polls on both sides showed Romney with a very slight advantage. Acting Gov. Jane Swift (R) is not seeking election.

In the debate, Romney tailored his appeal to political independents. He promised to block any new taxes next year when Massachusetts faces a multibillion-dollar budget deficit and said he would be a strong voice to curb the spending habits of the heavily Democratic legislature.

O'Brien, who has led among female voters, challenged Romney's assertion of being a consistent supporter of abortion rights and, unlike Romney, said she would reduce from 18 to 16 the age when women could obtain abortions without parental consent. She said she would approve no tax hikes until she had exhausted all the possibilities of savings.

The two sparred over charges that have dominated their TV ads; O'Brien and Romney have accused each other of allowing corporations for which each worked to engage in Medicare fraud. But both maintained composure as the accusations flowed back and forth.

It was a relatively calm climax to a race in which neither has been able to maintain a clear advantage.

Following a tactic that proved successful when Sen. Edward M. Kennedy (D-Mass.) turned back a challenge from Romney in 1994, the O'Brien campaign has made ads with workers from plants controlled by the Republican's former venture capital firm, who have told the TV cameras tear-filled stories about losing their jobs and benefits.

Romney has distanced himself from the decisions, saying he was on leave running the Salt Lake City Winter Olympics when these actions took place. But some of his strategists concede that the attacks -- along with publicity about his personal wealth -- have made it difficult for him to build the kind of blue-collar support that enabled former governors William F. Weld and Paul Cellucci to win as Republicans in this overwhelmingly Democratic state.

But Romney has appealed to suburban voters as someone who would curb patronage and scandal on Beacon Hill and use his corporate contacts to revive the slumping economy. And he has found material in O'Brien's background that has created problems for her bid to become the first woman elected as governor of the Bay State.

In addition to picking up and amplifying the criticisms of her management of state pension funds (down $7 billion in the last two years) that were raised by her opponents in the Democratic primary, Romney has charged that investments in Enron were influenced by O'Brien's husband, who at the time was a lobbyist with Enron as a client. Romney also has exploited newspaper stories reporting that pensions were being paid to former state employees convicted of crimes.

O'Brien said the slump in pension fund reserves can be blamed on the stock market and has vigorously denied any connection to the disputed pensions or any influence from her husband on investment decisions. But Democratic officials outside her campaign say she clearly took a pasting from those charges -- and from her waffling on the issue of gay marriages.

"The real problem," said one Democratic veteran, "is that she has had no message -- no sense of what she would do if she became governor." Also, the emergence of Green Party candidate Jill Stein, an articulate physician, in earlier debates could siphon votes from O'Brien on the left.

The exchange of personal charges has tended to obscure some clear differences on issues. Romney supports the death penalty and a ballot initiative to end bilingual education; O'Brien takes the opposite stance.

Romney has invested at least $4.7 million of his own money in the campaign, and Kerry Healy, his handpicked candidate for lieutenant governor, contributed almost $1.5 million. Chris Gabrieli, O'Brien's running mate, has contributed $750,000 to their joint campaign and spent more than $3 million to secure the nomination for himself.

Unlike four years ago, when Democrats were badly divided, the party's top officials and organized labor appear committed to a get-out-the-vote effort that Romney and the outnumbered Republicans may find it hard to match.

With Tim Russert of NBC News, center, moderating, Massachusetts gubernatorial candidates Shannon O'Brien and Mitt Romney debate in Boston.