Flights to the San Diego International Airport have resumed after police took into custody a gunman who fired shots at a nearby apartment complex, posing a threat to air traffic.

Police Lt. Scott Wahl says the domestic violence suspect walked out of the complex Wednesday afternoon, ending a more than five-hour standoff with officers.

Officers swarmed the building and exchanged gunfire with the man after responding to a domestic violence call.

The Federal Aviation Administration lifted its orders barring all flights from landing after the gunman moved into a part of his apartment where no longer posed a threat to air traffic.

He surrendered shortly after that. Wahl says no one was reported hurt.

San Diego International Airport's website showed a Southwest flight 1904 flying from Seattle was delayed after incoming flighters were barred; it was scheduled to land at 2:15 p.m. It's unknown if this delay is because of the flights not being allowed to land or another factor.

A passenger on a Southwest flight bound for San Diego says word spread quickly on board that the plane was being diverted because there was an active shooter near the airport.

Erik Carstensen was on a flight from Chicago that was diverted to an airport in Ontario, outside Los Angeles, after officials stopped planes from landing at San Diego International Airport.

Arriving planes swooped low over the neighborhood where the domestic violence suspect was holed up in his rooftop apartment, shooting sporadically.

Carstensen says passengers were told there was a security problem at the airport, but people on the Internet soon spread the news of the gunman.

He says he was worried since his wife was at the airport. He later learned the gunman was in a nearby neighborhood.

Want to talk about the news of the day? Watch free streaming video on the KIRO 7 mobile app and iPad app, and join us here on Facebook.

The Associated Press contributed to this report