When King David Kalakaua of the Kingdom of Hawaii visited Washington, D.C., in 1874, there was no guide for how President Ulysses S. Grant should welcome him. The White House had never hosted a foreign head of state—Hawaii would not be annexed by the United States until 1898—largely because travel overseas during the 18th and 19th centuries was long and hazardous.

No matter how the visit went, King Kalakaua’s trip would set a precedent.

The result was America’s first State Dinner with a foreign head of state, an intimate but elaborate meal consisting of more than 20 courses and 36 guests. The President, Vice President, and a host of other U.S. dignitaries were in attendance.

The reason for King Kalakaua’s visit and the primary topic of discussion? A trade deal.

America continued this tradition on April 24, 2018, when President Donald J. Trump hosted the first official State Visit of his Presidency. He was joined at the White House by French President Emmanuel Macron. While President Trump has hosted numerous foreign leaders in Washington from all over the world, the April 2018 France visit marked the first ceremonial State Visit of the Administration.

Download full size image Photo Credit: Official White House Photo by Keegan Barber American and French flags are hung on the exterior of the Eisenhower Executive Office Building at the White House, Friday, April 20, 2018, in Washington, D.C. The flags are in preparation for the upcoming State Visit to the White House by French President Emmanuel Macron.

One reason that official State Visits are rare is because they require ample time for planning and preparation. Everything from the 21-gun salute at the arrival ceremony to the seating arrangement at the dinner is meticulously coordinated. The formality of State Visits is both a way to honor the leaders of foreign countries and to pay homage to America’s own distinctive customs.

Today, State Visits include similar welcomes and dinners as to what King Kalakaua experienced, but the formal event has been refined and follows the traditions that were established in the 1950s and 1960s.

Most State guests today arrive in Washington, D.C., the day before their official arrival; they are then driven to the White House South Portico the morning of the ceremony. One of the U.S. Military bands plays the visiting country’s national anthem, followed by the American national anthem, and then the U.S. Army Old Guard Fife and Drum Corps performs a march. Each leader gives a public welcome statement.

Often, a formal working luncheon is planned at the State Department for the visiting delegation. If no such lunch takes place, the President and First Lady will often host a small, private lunch at the White House instead.

The crown jewel of the visit is the State Dinner. The President and First Lady greet the visiting head of state and his or her spouse at the White House North Portico before leading them upstairs to the Yellow Oval Room. Upstairs, they often tour historic rooms in the private residence. Other guests enter through the East Wing to the State Floor, awaiting the guests of honor’s entrance down the Grand Staircase. The hosts and guests of honor greet the attendees, and the President and First Lady escort their visitors to the State Dining Room. Larger dinners may be held in the Rose Garden or in the East Room of the White House.

Play 0:37 First Lady Melania Trump Prepares for France's State Visit First Lady Melania Trump Prepares for France's State Visit

The pomp and circumstance of State Dinners has always drawn public intrigue. The press was so curious about the details of State Dinners in the 1960s, for example, that President Lyndon B. Johnson had an electronic system installed so reporters could listen in to what was happening inside. Today, for greater transparency, cameras record the speeches that the President and his guest give.

The meal itself is a large production that is planned as much as two to four months in advance. Often the First Lady will hold a pre-visit tasting with her staff, occasionally including the President. The Reagans would taste meals 7 to 10 days before their guests arrived. White House chefs often combine American specialties with the visiting country’s own flavors for a unique experience.

State Visits are large ceremonial affairs, as is appropriate to show respect to the visiting leader. The end goal of any such occasion, however, is practical: The President and visiting head of state meet together for working sessions throughout the trip.

Just as negotiating for better trade deals drove King Kalakaua to the White House nearly a century and a half ago, trade was also high on the menu when President Trump hosted President Macron in Washington.