The flight pattern of a Boeing Dreamliner 787-8 created an airplane shape on Aug. 3. (William Neff/The Washington Post)

On Wednesday afternoon, a Boeing 787-800 Dreamliner took off from Seattle and flew about 2,000 miles to Marquette, Mich. It would have seemed an inconsequential flight — if not an odd city pairing — had the plane not turned back immediately and begun cruising southwest.

Just after reaching the tip of South Dakota, the Dreamliner banked right again, doing a seemingly random tour of the state’s airspace before turning south and veering into Nebraska.

What in the world was this plane doing?

The answer would become clearer after the Dreamliner had flown several more hours. It was then that flight-tracking apps showed exactly what the pilot was up to: Drawing a giant outline of itself over the United States.

On social media, people pondered the reasons for the amusing flight pattern: Was it a test flight? Stealth advertising for the Dreamliner? A gratuitous use of fuel? Perhaps the pilot was drunk, one person joked.

“Looks more like an Airbus to me,” another Twitter user commented. It was unclear if he was being serious.

Records show the Dreamliner is registered to Boeing Corporation. Boeing confirmed Thursday that the Dreamliner had been performing an 18-hour endurance test flight.

“Rather than fly in random patterns, the test team got creative, flying a route that outlined a 787-8 in the skies over 22 states,” Boeing spokesman Doug Alder, Jr., said in an email to The Washington Post.

“The nose of the Dreamliner is pointing at the Puget Sound region, home to Boeing Commercial Airplanes. The wings stretch from northern Michigan near the Canadian border to southern Texas. The tail touches Huntsville, Alabama.”

Boeing has been known for getting creative on mandatory test flights for new planes before. Earlier this year, pilots testing a new Boeing 737 MAX plane flew more than 3,400 miles to write “MAX” over Washington state and Montana.

In 2011, Boeing pilots testing a new 747-800 Freighter jet flew 2,500 miles to Pittsburgh to order sandwiches from Primanti Brothers, a local favorite, according to Triblive.com.

Interesting flight patterns are not uncommon, according to Flightradar24, a site that tracks live air traffic globally.

“’What’s this plane doing?’ is a question we get more than any other,” a Flightradar 24 blog says. “Users will post a screenshot to our Facebook or Twitter pages and wonder why they’re seeing a particular flight path.”

According to the site, reasons for unusual flight patterns can include pilots conducting aerial surveys, calibrating instrument landing systems, holding for airport congestion, avoiding bad weather and, yes, just having fun.

Aviation enthusiasts, of course, knew this right away. As the Dreamliner was completing its flight Thursday morning, people online reminisced about other memorable times planes had drawn interesting pictures in the sky, including examples that cannot be reprinted in a family newspaper.

This post has been updated.

Read more:

A woman threw coins at her plane for luck. One landed in the engine and caused a 5-hour delay.

Woman gives birth on Spirit Airlines flight, does not incur extra fees

Woman killed by jet-engine blast at popular Caribbean tourist attraction