President Reagan changed his mind and decided to sign legislation temporarily extending the federal cigarette tax at 16 cents a pack late Monday night after Senate Agriculture Committee Chairman Jesse Helms (R-N.C.) made a personal appeal to Reagan not to veto the bill, White House and congressional officials said yesterday.

Senior presidential aides who thought at 6 p.m. Monday that Reagan would veto the cigarette tax bill -- based on the president's statements earlier in the day -- were told in telephone calls from the White House at 11 p.m. that the president was about to sign it in his personal study, several of them said.

The White House announced that Reagan signed the bill shortly before midnight.

"Helms clearly made a strong pitch directly to Reagan," said one White House official who thought a veto was imminent. A second official said the president "didn't like the idea of the tax" early in the day. Reagan challenged aides at a weekly issues lunch, "Tell me it's impossible to veto."

In a later telephone call, Helms told Reagan he was calling in part because he wanted to keep "good faith" with other lawmakers on an arrangement made last month involving tobacco price-support legislation, officials said.

Helms, speaking for tobacco-state senators, had agreed to support the higher cigarette tax in exchange for attaching the tobacco bill to a deficit reduction measure, where it would have a far better chance of approval on the Senate floor than if it stood alone. Opponents have criticized the tobacco bill as a "bailout" to rid the tobacco growers and industry of the costs of a huge surplus piling up from past support programs.

Helms reportedly wanted to let Reagan know on Monday night that, although he had originally proposed that the 16-cent cigarette tax revert to 8 cents at this point, he was now supporting the temporary extension.

Helms also said that a veto would be "disruptive" to the industry because of uncertainty over the future of the tax.

Without mentioning Helms, the same reasoning was cited yesterday by White House spokesman Larry Speakes in explaining why Reagan had decided to sign the legislation.

The cigarette tax was raised from 8 cents a pack to 16 cents in 1982 to help fight the deficit, and tobacco-state lawmakers, including Helms, won a commitment at the time that it would be temporary. The higher tax was set to expire Monday night. Congress had voted a 45-day extension to allow more time to decide whether to continue it on a permanent basis.

Reagan on Monday told aides, who were apparently divided over a veto, that he viewed the extension as a tax increase and would not approve it. The administration's position in the past has been that the tax traditionally has been a major source of revenue for some states and that the federal government should not absorb those funds now.

After hearing Reagan endorse this view Monday, a number of White House officials told reporters that Reagan was expected to veto the bill when it reached him before a midnight deadline. Speakes said yesterday that he and "many others" in the White House expected a veto.

Word of a possible veto had reached Capitol Hill late Monday, and officials said Helms telephoned White House chief of staff Donald T. Regan at about 6 p.m., but did not reach him right away. Helms did reach White House legislative strategist Max L. Friedersdorf.

Later, Helms had a "lengthy and spirited" discussion with the president about the legislation, according to Senate Agriculture Committee chief of staff George S. Dunlop.

Reagan ended the conversation with Helms by saying he had not yet Reagan challenged aides, "Tell me it's impossible to veto." decided what to do. The president was host to a private dinner Monday night with the Prince and Princess of Liechtenstein in the White House family dining room. The dinner was scheduled to end at about 10:30 p.m.

Helm's warning about disruption in the industry gave an impetus to arguments that Reagan should sign the temporary extension. After the dinner, and facing a midnight deadline, Reagan accepted Helm's argument and signed the legislation, officials said.

Helms reportedly suggested to the president that the issue would be resolved by Congress within 45 days, but a drop in the tax at this time would create problems for retailers and wholesalers.

Yesterday, Speakes said Reagan has not dropped his opposition to the 16-cent tax, and officials said he is expected to fight proposals to make it permanent.