CAIRO — Al-Qaeda’s branch in Yemen claimed responsibility Sunday for last year’s deadly shooting at the Naval Air Station Pensacola by an aviation student from Saudi Arabia.

The shooter, 2nd Lt. Mohammed Saeed Alshamrani, was a member of the Saudi Air Force in training at the base. He opened fire inside a classroom at the base on Dec. 6, killing three people and wounding two sheriff’s deputies before one of the deputies killed him. Eight others were also hurt.

Al-Qaeda in the Arabian Peninsula, or AQAP, released a video claiming the attack. SITE Intelligence Group, which tracks messaging by militant groups, reported the claim.

AQAP has long been considered the global network’s most dangerous branch and has attempted to carry out attacks on the U.S. mainland.

The 18-minute video did not provide evidence of training the shooter, but did indicate that Alshamrani and AQAP were in communication, said Rita Katz, director of SITE. It was not clear when the video was recorded.

The video claimed that Alshamrani had been planning for years to attack a U.S. base, and had been training and “selecting” targets.

The video, which was viewed by The Associated Press, provided a will written by Alshamrani to his family in September 2019, three months prior to attack. He said he wanted to attack the U.S., citing religious reasons. However, he made no mention of al-Qaeda.

Foreign nationals participating in U.S. training go through a vetting process. The Pentagon says it includes screening for any illicit drug activities, support for terrorist organizations, corruption and criminal conduct.

The video included audio from top AQAP leader Qassim al-Rimi claiming “full responsibility” for the attack by Alshamrani, calling him “the hero, the courageous knight.”

A suspected U.S. drone strike destroyed a building housing al-Qaeda militants last week in eastern Yemen. President Trump retweeted several tweets and media reports that seemed to offer confirmation the strike killed al-Rimi.

Katz also said that AQAP did not state “May Allah Protect Him” in regard to al-Rimi, as its releases usually do. “(This) adds yet more suggestion to him indeed being killed,” she tweeted.

Al-Rimi was one of AQAP’s founders and became the group’s leader after Nasser al-Wahishi was killed in a U.S. drone strike in 2015.