Buried in President Reagan's 1983 State of the Union address were two short sentences that all but escaped public notice -- something about a plan "to simplify the tax code and make it more fair for all Americans."

What seemed a throwaway line in January 1983 is today the chief domestic policy initiative of the Reagan administration. Hailed by the president as "a challenge to lift us further into a future of unlimited promise," the tax-revision plan is scheduled to go -- with his blessing -- before the House Ways and Means Committee Thursday.

How the notion of restructuring the federal income tax got here from there is a tale of principle, politics and personalities, jockeying with each other for more than two years, resulting in a proposal that scarcely resembles what some of its patrons had in mind.

The tax plan is likely to change markedly in the next months as it moves through the House, where 1985 passage is still predicted, and the Senate, which has shown little enthusiasm and may not vote on the plan until next year.

The idea of tax reform, nowhere to be found in candidate Ronald Reagan's 1980 speeches on his goals as president, began to take shape in a White House working group as early as 1982, according to several officials.

But what propelled it to the top of Reagan's agenda, several administration officials said, was a concern by White House political strategists that the Democratic Party was about to seize the issue and run with it.

In 1982 Sen. Bill Bradley (D-N.J.) and Rep. Richard A. Gephardt (D-Mo.), both rising Democratic stars, proposed a far-reaching blueprint to close federal tax loopholes and lower the top individual income tax rate from 50 to 30 percent. Such a change would have dwarfed the president's 1981 tax reduction.

Moreover, in the wake of Reagan's 1981 cut, which greatly expanded corporate tax breaks, there was growing voter disaffection with perceived unfairness in the tax system.

"Everyone was concerned by late 1982 that Bradley-Gephardt would have tremendous appeal and the Democrats would run like crazy with it in 1984," a senior administration official recalled. " White House pollster Richard Wirthlin's polls indicated great appeal. So the whole premise was to devise something to preempt the Democrats."

In January 1984, previewing the themes of his reelection campaign, Reagan announced that then-Treasury Secretary Donald T. Regan was preparing "an historic reform for fairness, simplicity and incentives for growth . . . so personal tax rates could come down, not go up." He also said no details would be announced until December -- after the election.

Until then, the idea of revamping the tax code in some way had been discussed mainly by economists and lawyers in the bowels of the Treasury Department and by a small group of senior administration officials who were attracted to the notion, each for different reasons.

David A. Stockman, then federal budget director, and Martin Feldstein, then head of the Council of Economic Advisers, saw tax overhaul as a way to raise new revenue to reduce the growing federal deficit, several sources said. Then-White House chief of staff James A. Baker III, then-deputy chief Richard G. Darman and Regan wanted it for its own sake, and for its potential political appeal, the sources said. Secretary of State George P. Shultz saw possibilities for spurring savings and investment.

Reagan himself simply wanted a plan that reduced tax rates, several sources said. He had sent Regan a newspaper clipping on a "flat tax" -- with no deductions and one flat, low tax rate -- asking for Regan's reaction, an official recalled.

One Treasury official recalled his disappointment that this interest was not enough to launch tax reform in early 1983.

"I was reviewing the drafts of the 1983 State of the Union as they came back from the White House and I was becoming disturbed as the tax reform paragraphs got watered down step by step," he said. "We were reduced to an afterthought."

Regan, then-assistant Treasury Secretary John E. Chapoton and their staffs took the 1984 assignment with relish. Many at the Treasury had long been convinced that the system was so overloaded with breaks that it distorted economic choices, failed to generate needed revenue and retarded overall growth.

No sooner had Treasury begun work than politics intervened to push the issue backstage again.

Campaign advisers decided, according to several sources, that Reagan had nothing to gain and much to lose in his reelection effort from revealing details of the forthcoming tax proposal.

They feared that voters would see it as a disguised tax increase.

"They walled us off," a former Treasury official said. "They knew it was better for Reagan to talk about reform in the abstract than to tell the oil industry we might try to do away with the oil depletion allowance or tell people they might lose their 60 percent exclusion for capital gains."

By midsummer, the Treasury had set only the barest outlines. No one knew how much tax rates could be cut, which loopholes would be closed. The big question of whether the overhaul would be used to generate new tax revenue also remained ambiguous.

The president was dead-set against using the plan to raise revenue, as were Regan, Chapoton and others at the Treasury, officials said. But a deficit-conscious Stockman was still hopeful, according to an aide to the former budget chief. The federal deficit had passed $200 billion, and was shaping up as a big issue against Reagan, who once had promised to balance the budget.

Stockman moved to preserve that option, the aide said, by changing a key word in Reagan's fiscal 1985 budget message. The draft said: "To those who say we must raise taxes, I say no." After Stockman's editing, it read: "I say wait."

Ironically, Walter F. Mondale had a big hand in resolving the internal debate. In July 1984, he became the Democratic presidential nominee, and, to the amazement of GOP campaign officials, he did not endorse tax reform. Rather, he called for a tax increase to reduce the deficit, and accused Reagan of harboring a "secret" tax-increase plan of his own.

Two campaign officials recall that, at a White House meeting the next day, deputy campaign director Lee Atwater sidled up to Darman and asked: "There's nothing to this secret plan stuff, right?"

"Lee was laughing," one official recalled. "But Darman just looked at him kind of funny and said: 'There may be.' Lee went crazy. He said: 'Change it! Burn it! Don't let it happen -- at least not anytime soon!' "

Campaign officials then persuaded Reagan to harden his line against a tax increase. He said first he would brook it only as a "last resort" and, later, "over my dead body." When Mondale asked how he would reduce the deficit without more taxes, the president often switched to tax reform, promising "all pleasure and no pain," as one campaign official put it.

"Mondale's secret-plan charge was a big reason that tax reform moved so high on Reagan's agenda," an adminstration official said.

Within the Treasury, a combination of politics and principle determined the new, proposed tax brackets -- 15, 25 and 35 percent -- to replace the present 14 brackets. Treasury officials had aimed for a top bracket of 25 percent -- to undercut Bradley-Gephardt by 5 points -- but could not close enough loopholes to make up for the revenue that would be lost. The lowest they could get was 16, 28 and 37, an official recalled. But Regan nixed those as unworkable.

"He said it sounded like a quarterback barking out signals and it wouldn't fly unless it was something simple everybody could remember," the official recalled. "He told us to go back and juggle until we got it to 15-25-35. So we made some adjustments."

The feared Democratic threat had not materialized, but by election day there was no retreating from tax reform. Details of the Treasury's plan had begun to leak, including an explosive proposal to repeal the state and local tax deduction. Fearful that the leaks would undermine the entire plan, Regan persuaded the president to let him make it public in late November.

Many White House officials were stunned at what emerged: proposals to repeal tax incentives cherished by industries large and small, and by tens of thousands of Americans; rhetoric decrying tax breaks as undesirable federal intrusions in the free market; a veritable repudiation of Reagan's 1981 corporate tax changes.

Reagan's first reaction upon seeing the plan, sources said, was to question why doctors couldn't keep their tax deduction for country club dues, since they use club contacts to obtain patients.

"Lowering rates and reforming the system were the only buzz words most people at the White House knew," said a former Treasury official. "They had no idea that it would take this kind of pain to get there."

Darman and Baker, longtime devotees of the idea, moved to the Treasury early this year, determined to make tax overhaul a reality. Regan came to the White House, replacing Baker, with the same goal.

Under its new leaders, the Treasury softened many of its sensitive proposals. The plan being considered by Ways and Means no longer seeks to extricate social policy from the tax code; rather it favors certain kinds of income, such as capital gains, while still closing many loopholes. However, public enthusiasm is flagging. Sources said recent White House polls show a 10-point drop in the support for tax overhaul since March -- from 51 percent of Americans to about 40 percent. Some public polls show less support than that.

"A lot of high-powered people in the Treasury and the White House had a pretty heavy investment and they got the president out there pretty far," a senior administration official said. "So nobody really bothered to feel the political pulse of the American public to see if it was still an issue, and the answer is that it's not."

Darman pointed out that the 1981 tax bill did not rank high in popularity polls at a comparable stage, either. "Almost all the big and interesting things that require initiative in order to happen start out as odds-against," he said. "Lots of things start out that way, but for some the odds eventually turn."