One of the three students who attended the dinner party videotaped outside the building while the shooting was taking place at Naval Air Station Pensacola on Friday, said the U.S. official, who spoke on condition of anonymity after being briefed by federal authorities. Two other Saudi students watched from a car, the official said.
The official said 10 Saudi students were being held on the base Saturday while several others were unaccounted for.
U.S. officials had previously told the AP they were investigating possible links to terrorism.
The student opened fire in a classroom at the base Friday morning, killing three people.
A U.S. official who spoke to The Associated Press on condition of anonymity on Friday identified the shooter as Mohammed Saeed Alshamrani. The official wasn't authorized to discuss the matter publicly. The official also said the FBI was examining social media posts and investigating whether he acted alone or was connected to any broader group.
MORE: What we know about suspected Pensacola naval station shooter Mohammed Alshamrani
The assault, which prompted a massive law enforcement response and base lockdown, ended when a sheriff's deputy killed the attacker. Eight people were hurt in the attack, including the deputy and a second deputy who was with him.
Family members on Saturday identified one of the victims as a 23-year-old recent graduate of the U.S. Naval Academy who alerted first responders to where the shooter was even after he had been shot several times.
"Joshua Kaleb Watson saved countless lives today with his own," Adam Watson wrote on Facebook. "He died a hero and we are beyond proud but there is a hole in our hearts that can never be filled."
Florida U.S. Sen. Rick Scott issued a scathing statement calling the shooting - the second on a U.S. Naval base this week - an act of terrorism "whether this individual was motivated by radical Islam or was simply mentally unstable."
During a news conference Friday night, the FBI declined to release the shooter's identity and wouldn't comment on his possible motivations.
"There are many reports circulating, but the FBI deals only in facts," said Rachel L. Rojas, the FBI's special agent in charge of the Jacksonville Field Office.
Earlier Friday, two U.S. officials identified the student as a second lieutenant in the Saudi Air Force, and said authorities were investigating whether the attack was terrorism-related. They spoke on condition of anonymity to disclose information that had not yet been made public.
President Donald Trump declined to say whether the shooting was terrorism-related. Trump tweeted his condolences to the families of the victims and noted that he had received a phone call from Saudi King Salman.
He said the king told him that "this person in no way shape or form represents the feelings of the Saudi people."
The Saudi government offered condolences to the victims and their families and said it would provide "full support" to U.S. authorities.
The U.S. has long had a robust training program for Saudis, providing assistance in the U.S. and in the kingdom. The shooting, however, shined a spotlight on the two countries' sometimes rocky relationship.
The kingdom is still trying to recover from the killing last year of Washington Post columnist Jamal Khashoggi at the Saudi Consulate in Istanbul. Saudi intelligence officials and a forensic doctor killed and dismembered Khashoggi on Oct. 2, 2018, just as his fiancée waited outside the diplomatic mission.
One of the Navy's most historic and storied bases, Naval Air Station Pensacola sprawls along the waterfront southwest of the city's downtown and dominates the economy of the surrounding area.
Part of the base resembles a college campus, with buildings where 60,000 members of the Navy, Marines, Air Force and Coast Guard train each year in multiple fields of aviation. A couple hundred students from countries outside the U.S. are also enrolled in training, said Base commander Capt. Tim Kinsella.
All of the shooting took place in one classroom and the shooter used a handgun, authorities said. Weapons are not allowed on the base, which Kinsella said would remain closed until further notice.
Adam Watson said his little brother was able to make it outside the classroom building to tell authorities where the shooter was after being shot "multiple" times. "Those details were invaluable," he wrote on his Facebook page.
Watson's father, Benjamin Watson, was quoted by the Pensacola News Journal as saying that his son was a recent graduate of the U.S. Naval Academy who dreamed of becoming a Navy pilot. He said he had reported to Pensacola two weeks ago to begin flight training. "He died serving his country," Benjamin Watson said.
The shooting is the second at a U.S. naval base this week. A sailor whose submarine was docked at Pearl Harbor, Hawaii, opened fire on three civilian employees Wednesday, killing two before taking his own life.
CORRECTION: An earlier version of this article stated that the dinner party occurred the night before the attack. The U.S. officials said the party was hosted earlier the week of the shooting, though not necessarily on Thursday.