TEHRAN — Iran and Boeing signed a deal for the sale of 80 airplanes on Sunday, five weeks before the inauguration of President-elect Donald J. Trump, whose Republican supporters in Congress have tried to block any aircraft sales to Iran.

Iran’s national airline, Iran Air, said that it had signed an agreement with Boeing, an American manufacturer, to purchase the aircraft, at a total cost of $16.6 billion.

In September, the Treasury Department gave approval for Boeing and its European competitor, Airbus, to sell planes to Iran.

Boeing confirmed the deal, saying that the contract was reached within the terms of the government license that the department had issued.

The sale includes 50 twin-jet, narrow-body 737 planes and 30 long-range, wide-body 777 aircraft. The first airplanes are scheduled for delivery in 2018, with the entire order being fulfilled over 10 years.

For nearly four decades, no American companies could engage in significant business with Iran, which officially considers the United States an archenemy. But with the deal, the country is not only buying aircraft from an American supplier; it also means there will be long-term interaction between Boeing trainers and employees of Iran Air.

The likelihood of the agreement being carried out, however, has decreased with the election of Mr. Trump.

His Republican supporters in Congress introduced a bill that attempts to stop sales by Boeing to Iran, obliging the Treasury Department to refuse the licenses needed by American banks to finance such an agreement. The bill passed the House of Representatives in November, but President Obama has vowed to veto the legislation should it also gain Senate approval.

Mr. Trump has had different stances on the sales of Boeing aircraft to Iran. In June, his campaign gave out a statement on the negotiations between Iran and Boeing, saying, “The world’s largest state sponsor of terror would not have been allowed to enter into these negotiations with Boeing without Clinton’s disastrous Iran nuclear deal.”

But in January, he complained in a post on Twitter that after the nuclear agreement, which was enacted that month, the Iranians were going to spend their money in Europe rather than in the United States.

“Iran is going to buy 116 jetliners with a small part of the $150 billion we are giving them … but they won’t buy from U.S., rather Airbus,” he wrote.

With American banks possibly being blocked from financing and maybe even transferring money involved in the deal, it is unclear how Iran would pay for the aircraft. The Iranian state news agency, IRNA, in a report on the deal, made no mention who would finance the purchases. It did say that the agreement was not yet fully finalized.

Abbas Akhoundi, Iran’s minister of roads and urban development, told state television that the contract was a clear message to the world. “In spite of all the warmongering,” he said, “businessmen and financiers gave a signal to the world that we are supporters of calmness, security and the development of relations.”