A Southwest Airlines flight from Phoenix to Sacramento was diverted to a military base in Yuma, Ariz., on Friday afternoon after the rapid decompression of the cabin, federal officials said. Passengers aboard Flight 812 said that a hole appeared in the cabin after they heard a noise that sounded like a gunshot, and that the plane, a Boeing 737, began descending rapidly. Cellphone photographs showed a panel hanging open in a section above the plane’s middle aisle. Southwest said no one was injured, but one of the passengers, Brenda Reese, said “there were some people that were passing out because they weren’t getting the oxygen.” She said that one flight attendant’s oxygen did not work and that he fell and got a bloody nose. Ms. Reese said that there was “no real panic” and that the passengers applauded the pilot when he emerged from the cockpit after the emergency landing. The authorities said the plane landed safely at Yuma Marine Corps Air Station-International Airport at 4:07 p.m., about 40 minutes after takeoff. The Federal Aviation Administration said that an inspector was on the way to investigate.