New documents provided to NBC News show that Omar Mateen talked to a fellow recruit in a Florida Department of Corrections training class in 2007 about bringing a gun to the training program.
His colleague wrote in a report that Mateen asked him, "if he was to bring a gun to school would I tell anybody."
The Warden of the Martin Correctional Institution, P.H. Skipper, wrote "in light of the tragic events at Virginia Tech officer Mateen's inquiry about bringing a weapon to class is at best extremely disturbing."
Mateen, 29, opened fire at a gay nightclub in Orlando early Sunday, killing 49 people in the deadliest mass shooting in modern American history. President Barack Obama has called the attack an act of terrorism and hate.
Mateen never was certified as a correctional officer, the Florida Department of Corrections said. He began with the department on Oct. 27, 2006, but was involuntarily dismissed on April 27, 2007.
The documents from the Department of Corrections, provided as a result of a public information request by NBC News, show that Mateen fell asleep in class twice and one time at a gun range.
In recommending dismissal, Skipper referenced Mateen falling asleep but called the comment about bringing a gun to class most disturbing.
The comments about bringing a gun to class were made April 14, 2007, two days before Seung-Hui Cho fatally shot 32 people at Virginia Tech, the shooting referenced by Skipper in the documents. The comment was recorded in a report dated April 23, 2007.
"Omar Mateen was not fit to serve as a member of the FDC team, as he was unable to meet the basic requirements of the correctional officer academy," the department said in a statement.
Mateen was killed in a shootout with police after an hours-long standoff at the nightclub.
Mateen's father has said Mateen in the past was angry after seeing two men kiss, and authorities said he called 911 and pledged allegiance to the the terror group ISIS during the attack and standoff, but a motive has not been established.
The Pulse nightclub where the attack occurred had a surveillance system that likely captured the rampage, and the FBI has the video, a law enforcement official said Friday.