"King Felipe VI, accompanied by Queen Letizia of Spain, has accepted an invitation from The Queen to pay a State Visit to the United Kingdom from 8th to 10th March 2016," a palace spokesman told The Local.
It will be the royal couple's first visit to the United Kingdom since Felipe became king, in June 2014, after his father, King Juan Carlos abdicated.
The last state visit by Spanish royalty to the UK was by King Juan Carlos and Queen Sofia in 1986, while the Queen and the Duke of Edinburgh last paid a visit to Spain in 1988.
Since then the Spanish and British royal families have paid a number of formal visits to each other's countries.
In 2011, The Prince of Wales and The Duchess of Cornwall paid a three-day official visit to Spain that was hosted by Prince Felipe and Princess Letizia. A few weeks later Queen Sofia, Prince Felipe and Princess Letizia attended the wedding in London of Prince William to Catherine Middleton.
King Felipe and Queen Letizia will stay at Windsor Castle during the three-day visit.
The British Ambassador to Spain, Simon Manley, has welcomed the announcement of a State Visit to the United Kingdom.
“The British government is delighted that Their Majesties King Felipe VI and Queen Letizia of Spainhave accepted the invitation from Her Majesty The Queen,” said Mr Manley.
“This State Visit will celebrate not only the long and deep royal and historic ties between our two countries, but also our strong relationship as partners in the European Union, NATO and United Nations. We enjoy close connections in terms of culture, trade, investment, security and defence. This is an opportunity to celebrate and deepen those links.”
The British and Spanish Royal Families are directly related through the marriage of Alfonso XIII of Spain to Princess Victoria Eugenia, known as Ena, granddaughter of Queen Victoria, in 1906. Victoria Eugenia is the great-grandmother of King Felipe.