President Donald Trump has reached an informal deal with Boeing to provide two Air Force One planes for $3.9bn (£2.8bn), the White House has said.

A White House spokesperson said the agreement would save US taxpayers more than $1.4bn.

The deal follows a row over the cost of the planes. In December 2016, Mr Trump said they were too expensive and the order should be cancelled.

Boeing said that Mr Trump had "negotiated a good deal".

In a statement, the US aerospace giant said: "Boeing is proud to build the next generation of Air Force One, providing American Presidents with a flying White House at outstanding value to taxpayers".

A Boeing official said the price included fitting out the two 747-8 planes with a communications suite each, internal and external stairs, and large galleys and other equipment.

In addition, there are structural changes that have been made to the aircraft "to protect and sustain the president and those on board for an extended period of time", the official said.

The planes are designed to be an airborne White House, able to fly in worst-case security scenarios, such as nuclear war, and are modified with military avionics, advanced communications and a self-defence system.

The government had a contract with Boeing to build two or more new planes. But in 2016, before Mr Trump was president, he tweeted that they were too expensive.

"Boeing is building a brand new 747 Air Force One for future presidents, but costs are out of control, more than $4 billion. Cancel order!" he said.

At the time, The White House appeared to cast doubt on the figures quoted by Mr Trump.

"Some of the statistics that have been cited, shall we say, don't appear to reflect the nature of the financial arrangement between Boeing and the Department of Defence," White House spokesman Josh Earnest said.

The $1.4bn Mr Trump claimed would be saved on the new planes has not been independently verified.

US aerospace analyst Richard Aboulafia said Boeing would only have so much room to offer discounts given the high proportion of third party equipment that would be used on the aircraft.

"There's no evidence of a discount," he said adding that the White House was engaging in "political theatre".

Technically, "Air Force One" is a call sign for any aircraft carrying the US president.

However the term is mostly used to refer to the current fleet - two highly customised Boeing 747-200B jets, which have been in service since 1990.

The planes are:

Capable of in-flight refuelling, and equipped with secure communications equipment

Inside, the president and his travel companions enjoy 4,000 sq feet (400 sq m) of floor space on three levels

This includes a presidential suite as well as quarters for advisers, Secret Service officers, and the travelling press corps

A medical suite can function as an operating room, and a doctor is always on board

The plane's two food preparation galleys can feed 100 people at a time.