Mr. Romney’s campaign against the tax loopholes, like no other period in his career, put him at odds with the values and expectations of the corporate world from which he came. Today, in seeking the Republican presidential nomination, Mr. Romney promotes himself as the pro-business candidate who understands what companies need and how to create jobs.

An examination of the period reveals a more complicated picture. It shows a governor who sometimes put the need to find new revenues ahead of the conservative argument that tax increases almost by definition kill jobs; a shrewd financial manager who aides said was guided by a strong sense of rectitude, not just pragmatism; and a political aspirant willing to buck the orthodoxies of his own party — at least, state lawmakers said, until his national ambitions tempered that impulse and led him to steer a more conservative course.

Today Mr. Romney rarely, if ever, discusses on the campaign trail how he closed the Massachusetts tax loopholes. There is no proud description of them in his two books, even though many lawmakers in the state consider them a rare show of political courage.

“I was surprised that he did what I thought was the right thing to do,” said Michael W. Morrissey, a Democratic state senator during the Romney years and now a district attorney in the state.

Eric Fehrnstrom, a spokesman for Mr. Romney and a former aide in his administration, defended his record, saying he had been on good terms with a business community that benefited from a variety of his economic development policies. “Did they see eye to eye on everything?” Mr. Fehrnstrom said. “Not always. But more than anything they appreciated the strong leadership Mitt Romney brought to the governor’s office in getting the budget under control and bringing the state economy out of its tailspin.”