GREENVILLE, S.C.—Republican U.S. Sen. Lindsey Graham was on board a United Airlines flight to Washington, D.C., that had to turn back to the Greenville-Spartanburg International Airport because a warning light came on in the cockpit.

Airport spokesman Rosylin Weston said the plane landed safely about 3 p.m. Monday. The aircraft had 40 people on board.

One of those passengers was Graham, who said on his Twitter account that he and other passengers heard an odd noise from the engine after taking off.

Graham called it an interesting day, and thanked the firefighters and other first responders who were waiting as the plane made its emergency landing.