LOS ANGELES — The space shuttle Endeavour landed safely at Los Angeles International Airport Friday after a whirlwind aerial tour around California landmarks.
Strapped to the back of a 747 jumbo jet, the pair touched down about 1 p.m. after a nearly five-hour flyover. One of the crew members stuck a US flag out of the hatch of the jet.
The flyover took Endeavour over the state Capitol, Golden Gate Bridge, Hollywood sign, and other popular local icons en route to the Los Angeles airport, where the shuttle will be prepped for a slow-speed journey to its museum home next month.
At the Santa Monica Pier, spectators pointed their cameras skyward and some chanted, ‘‘USA! USA!’’ as Endeavour swooped along the coast.
‘‘Even though it was a few seconds, it was a unique experience to witness history,’’ said Andrew Lerner, 23, of Santa Monica.
Thousands of spectators jammed rooftop buildings and streets in Sacramento, cheering as Endeavour made two loops around the state Capitol. A crowd of schoolchildren squealed in delight during the second flyover.
Matthew Montgomery took a break from his work as a legislative aide and brought his 2-year-old son, Tavion, to see Endeavour airborne.
‘‘I was going to leave him in day care but thought this is a once-in-a-lifetime deal,’’ said Montgomery, whose aunt was an engineer on the early Apollo missions.
With Endeavour buzzing by some of the Golden State’s most iconic sights, law enforcement and transportation authorities warned motorists not to ‘‘gawk and drive.’’
‘‘We want people to take in this majestic show,’’ Los Angeles police Commander Scott Kroeber said earlier this week. ‘‘But if you’re driving, please drive and don’t try to take in the show simultaneously.’’
Traffic came to a near stop along a freeway near the NASA Jet Propulsion Laboratory east of Los Angeles when motorists pulled off to the shoulder to watch.
California Highway Patrol officers came through and blared on loud speakers for people to move on.
Extra officers were on duty along the freeways near the airport to make sure traffic flowed smoothly as the shuttle zoomed overhead.
Endeavour returned to its birthplace Thursday after an emotional cross-country ferry flight that made a special flyover of Tucson to honor its last commander, Mark Kelly, and his wife, former US Representative Gabrielle Giffords of Arizona.
NASA’s shuttle fleet, which was retired last year after three decades of flight, was assembled in Palmdale near Edwards Air Force Base, where Endeavour took off Friday morning for the aerial tour.