The Saudi national who killed three people during last week’s shooting spree at Naval Air Station Pensacola filed a complaint against one of his instructors earlier this year alleging that he had called him “Porn Stash” — a nickname that “infuriated” him, a report says.

Mohammed Alshamrani, who prepared the document with the help of two American classmates, according to The New York Times, claimed teacher James Day labeled him with the term at the end of a meteorology class in April.

In the complaint, Alshamrani wrote that Day was asking about 10 students around the room if they had any questions before dismissal. When he turned to Alshamrani, Day allegedly addressed him as “Porn Stash.”

“Laughing, he continued to ask, ‘What? Have you not seen a porn star before?’” Alshamrani reportedly wrote in the complaint. “After I did not respond, he just let go of the subject.”

The NAS Pensacola shooter is identified as Mohammed Alshamrani, a 21-year-old 2nd Lieutenant in the Royal Saudi Air Force who was a student naval flight officer of Naval Aviation Schools Command.

The NAS Pensacola shooter is identified as Mohammed Alshamrani, a 21-year-old 2nd Lieutenant in the Royal Saudi Air Force who was a student naval flight officer of Naval Aviation Schools Command. (FBI)

PENSACOLA SHOOTER TRAVELED TO NEW YORK CITY BEFORE ATTACK, REPORT SAYS

The nickname is a reference to the stereotype that adult male film stars have mustaches. It was spelled "porn stash" as opposed to "porn 'stache" in the official complaint.

“I was infuriated as to why he would say that in front of the class,” the Times quoted Alshamrani as saying.

Day is employed by Delaware Resource Group of Oklahoma, a subcontractor to CAE USA, which offers instruction to aviation students in the civilian and military fields, according to the newspaper.

Following the alleged incident, Alshamrani reported it to CAE USA’s managers, The New York Times says. The company offered to have Day apologize, but Alshamrani rejected that proposal and instead talked with an office in the Navy that handles international students, the newspaper added, citing a person who spoke with Alshamrani after he filed the complaint.

NAS Pensacola after Friday's shooting

NAS Pensacola after Friday's shooting (FBI)

That same person said numerous government employees believed Day should be disciplined, yet he continued to teach.

AFTER PENSACOLA ATTACK, FLORIDA GOV. DESANTIS URGES 'PRECAUTIONS' FOR FOREIGN NATIONALS TRAINING WITH US MILITARY

About a week after the alleged incident, Day was paired up with Alshamrani for simulated flight training, The New York Times reported. When the Saudi found out, he complained to CAE USA and got the session rescheduled with another instructor, it added.

Brian Busey, the president of Delaware Resource Group of Oklahoma, told the Times that his company is cooperating with the FBI’s investigation into Friday’s shooting and that it had taken care of the alleged classroom incident in April.

“Appropriate personnel action was taken regarding the incident in question, corrective action was taken, the matter was closed back in April, and we have no further comment,” Busey said.

Day himself, through Busey, declined comment on the alleged incident.

PENSACOLA GUNMAN 'JUST SHOT THROUGH THE DOOR' DURING RAMPAGE, SURVIVOR SAYS

There is no indication yet that it had any connection to the shooting spree, in which Alshamrani gunned down three fellow sailors before being taken out by responding police officers.

The bodies of the three victims were flown to Dover Air Force Base in Delaware Sunday night.

An Air Force carry team moves a transfer case containing the remains of Seaman Apprentice Cameron Scott Walters -- one of the victims of the Pensacola shooting -- on Sunday at Dover Air Force Base in Delaware. 

An Air Force carry team moves a transfer case containing the remains of Seaman Apprentice Cameron Scott Walters -- one of the victims of the Pensacola shooting -- on Sunday at Dover Air Force Base in Delaware.  (AP)

As of Monday, a motive for the attack has not been publicly revealed and authorities are investigating it as an act of terrorism.

A U.S. official on Friday told the AP the FBI was examining social media posts and investigating whether he acted alone or was connected to any broader group. The SITE Intelligence Group, a group that monitors jihadist media, said that Alshamrani posted to Twitter echoing sentiments from former Al Qaeda leader Usama Bin Laden.

An Air Force carry team moves the transfer case containing the remains of Navy Seaman Apprentice Cameron Scott Walters, of Richmond Hill, Ga., Sunday, Dec. 8, 2019, at Dover Air Force Base, Del. A Saudi gunman killed three people including Walters in a shooting at Naval Air Station Pensacola in Florida.

An Air Force carry team moves the transfer case containing the remains of Navy Seaman Apprentice Cameron Scott Walters, of Richmond Hill, Ga., Sunday, Dec. 8, 2019, at Dover Air Force Base, Del. A Saudi gunman killed three people including Walters in a shooting at Naval Air Station Pensacola in Florida. (AP)

A spokesperson for Twitter told Fox News in an email statement Saturday that the account was suspended but they declined to comment further as to when the manifesto was tweeted out. The FBI told Fox News it was aware of the anti-American Twitter post, but would not comment on whether they're looking at it as part of the investigation.

CLICK HERE TO GET THE FOX NEWS APP

Alshamrani – a 2nd lieutenant in the Royal Saudi Air Force and a student naval flight officer at the time of his death – first started training with the U.S. military in August 2017, according to The New York Times.

He was set to graduate next August and returned to Saudi Arabia during breaks. However, when he came back to the U.S. in February, friends and classmates noticed he had turned more religious, a person familiar with the FBI’s investigation told the newspaper.

Fox News’ Travis Fedschun contributed to this report.