The palace said Trump and his wife, Melania, had accepted an invitation from the queen for a visit that will take place June 3-5. Though many other presidents have visited the monarch, only two — George W. Bush and Barack Obama — were honored with a state visit, which typically features royal pomp including a banquet with the queen at Buckingham Palace.
It's rare for a state visit to be announced just a few weeks before it takes place. Prime Minister Theresa May extended the invitation for a state visit soon after Trump's inauguration in January 2017, but the trip has been deferred amid concerns about the president's reception in the U.K. and Britain's extended crisis over Brexit.
Trump finally made an official trip to the U.K. last summer, though that was not a state visit. Demonstrators followed him everywhere nonetheless, with tens of thousands flooding the streets of central London to protest his presence and a 20-foot (6-meter) balloon depicting the U.S. president as a screaming baby flown near Parliament.
In addition to meeting with the queen, Trump will also sit down with May, whose handling of Brexit he has repeatedly criticized. It has not been announced whether he will address Parliament, an honor granted to presidents including Ronald Reagan and Barack Obama.
May said in a statement that Britain and the United States "have a deep and enduring partnership that is rooted in our common history and shared interests."
"The state visit is an opportunity to strengthen our already close relationship in areas such as trade, investment, security and defense, and to discuss how we can build on these ties in the years ahead," she said.
Trump and the first lady also plan to attend a ceremony in the naval city of Portsmouth to commemorate the 75th anniversary of the D-Day landings on the final day of his visit, the White House said.
Nations that took part in the campaign to liberate Europe from Nazi Germany have been also been invited to attend. They include Canada, France, Australia, New Zealand, Belgium, Luxembourg, Poland, Norway, Denmark, Netherlands, Greece, and Slovakia and the Czech Republic. Germany has also been invited in keeping with previous D-Day commemorative events.
After leaving Britain, Trump and his wife will travel to Normandy, in northern France, as a guest of President Emmanuel Macron to attend D-Day ceremonies at the Normandy American Cemetery at Colleville-sur-Mer.
While in France, Trump will also meet separately with Macron.
Associated Press reporter Darlene Superville contributed from Washington.