"It was about 30 or 40 minutes into the class when I heard a couple of shots fired, I couldn't hear anything when he had walked in because my ears where ringing so badly," the 18-year-old student, Mathew Downing, said in a statement released Friday.
The gunman ordered everyone to get into the center of the room and to be quiet, and he put a backpack on the front desk and pulled out an envelope that he said contained a flash drive, Downing said.
"He looked directly at me and said hey kid with the glasses you are the lucky one, I will not shoot you if you give this to the cops," Downing said in the statement.
"I stood up and he pointed the gun at me and this is the moment I thought I was going to die," Downing said. "He paused for a second and then handed the envelope to me and said to sit in the very back seat and face him."
Virginia Tech in Blacksburg, Virginia -- 33 killed (including shooter), 23 injured on April 16, 2007
Virginia Tech students gather at a makeshift memorial Monday, April 16, 2007, on campus following a shooting that killed more than 30 people on campus earlier in the day. (Photo by Ted Richardson/Raleigh News & Observer/MCT via Getty Images)
Sandy Hook Elementary in Newtown, Connecticut -- 28 killed (including shooter), 2 injured on December 14, 2012
Residents grieve following a shooting December 14, 2012 at Sandy Hook Elementary School on December 14, 2012 in Newtown, Connecticut. At least 26 people, including 20 young children, were killed when a gunman assaulted the school and another body was found dead at a second linked crime scene, police said. Police spokesman Lieutenant Paul Vance told reporters that the attacker killed 20 children and six adults, including someone that he lived with, at the Sandy Hook Elementary School in Newtown, Connecticut. The gunman also died at the scene, and a 28th body was found elsewhere. AFP PHOTO / Don EMMERT (Photo credit should read DON EMMERT/AFP/Getty Images)
University of Texas in Austin, Texas -- 16 killed (including shooter), 32 injured on August 1, 1966
Police officer Ramiro Martinez (left) at a press conference after he and other officers shot student Charles Whitman (1941 - 1966) dead after Whitman went on a shooting spree at the University of Texas at Austin, 1st August 1966, killing 15 and wounding 31. (Photo by Shel Hershorn/Hulton Archive/Getty Images)
Columbine High School in Columbine, Colorado -- 15 killed (including gunmen), 24 injured on April 20, 1999
Police officers gather in front of Columbine High School, in Littleton, CO, before searching the building to insure that it was secure 20 April 1999, following a shooting spree by two masked teenagers. As many as 25 students were killed when two gunmen opened fire on students inside the school building, before turning their weapons on themselves in the rampage. AFP Photo by Mark LEFFINGWELL (Photo credit should read MARK LEFFINGWELL/AFP/Getty Images)
Umpqua Community College in Roseburg, Oregon -- 10 killed (including shooter), 9 injured on October 1, 2015
Led by chaplain Toni New, a chaplain for the Billy Graham rapid response team, friends of the late Rebecka Ann Carnes, one of the Umpqua community college shooting victims, embrace each other for an emotional prayer at a memorial service in Winston, Ore., on Oct. 3, 2015. (Marcus Yam / Los Angeles Times via Getty Images)
Red Lake High School in Red Lake, Minnesota -- 10 killed (including shooter), 5 injured on Marck 21, 2005
This Red Lake Net News internet webpage photo captured 22 March, 2005 shows people and emergency vehicles outside of the Red Lake Senior High School in Red Lake, Minnesota. A teenage student went on a shooting rampage at an Indian reservation 21 March, killing his grandparents at their home and then seven people at his school, grinning and waving as he fired, authorities and witnesses said. The suspect apparently killed himself after exchanging gunfire with police. The shooting is the worst US school massacre since Columbine in 1999, police and local media said 22 March. AFP PHOTO/DSK (Photo credit should read DSK/AFP/Getty Images)
Oikos University in Oakland, California -- 7 killed, 3 injured on April 2, 2012
Bodies of the shooting victims at Oikos University are covered with tarps on the ground as police survey the scene on April 2, 2012 in Oakland, California. According to the Oakland Police Department, the shooting suspect is believed to be in custody. (Photo by Jed Jacobsohn/Getty Images)
Isla Vista killings near University of California at Santa Barbara -- 7 killed (including gunman), 14 injuted on May 23, 2014
Two men kneel at a makeshift memorial after a killing rampage May 24, 2014 left seven people dead, in Isla Vista near Santa Barbara California May 24, 2014. Authorities said the 22-year-old lone gunman, Elliot Rodger the son of a director who worked on the 'The Hunger Games' killed six people. Rodger also died in the attack. (Photo by ROBYN BECK/AFP/Getty Images)
Poe Elementary School bombing in Houston, Texas -- 6 killed (including perpetrator), 19 injured on September 15, 1959
Northern Illinois University in DeKalb, Illinois -- 6 killed (including shooter), 17 injured on February 14, 2008
A memorial to slain students sits near Cole Hall on the campus of Northern Illinois University February 15, 2008 in DeKalb, Illinois.Six people were killed including the gunman and 16 others were wounded after University of Illinois graduate student Stephen Kazmierczak opened fire with a shotgun and three handguns inside a lecture hall. This is the fourth shooting at a U.S. school within a week. (Photo by Scott Olson/Getty Images)
Westside Middle School shooting in Jonesboro, Arkansas -- 5 killed, 10 injured on March 24, 1998
Flower covered graveside of slain teacher Shannon Wright who died protecting student during March 24 shooting attack at Jonesboro Westside Middle School by peer gunmen Mitchell Johnson, 13, & Drew Golden, 11. (Photo by Barbara Laing/The LIFE Images Collection/Getty Images)
West Nickel Mines School in Nickel Mines, Pennsylvania -- 6 killed (including gunman), 5 injured on October 2, 2006
Investigators search the one-room West Nickel Mines Amish School 03 October 2006 in the town of Nickel Mines, Pennsylvania. According to officials a milk truck driver identified as Charles Carl Roberts IV entered the schoolhouse, let the boys and adults go free, tied up the girls and shot them execution style before committing suicide. Five girls were killed and at least seven others injured. AFP PHOTO/Stan HONDA (Photo credit should read STAN HONDA/AFP/Getty Images)
Santa Monica shooting in Santa Monica, California -- 6 killed (including gunman), 2 injured on June 7, 2013
Investigators look around near the scene of two shooting fatalities and a possible suspicious package after multiple shootings took place at various locations including Santa Monica College June 7, 2013 in Santa Monica, California. According to reports, at least six people have died in the shootings. (Photo by David McNew/Getty Images)
Thurston High School in Springfield, Oregon -- 4 killed (2 elsewhere), 25 injured on May 20-21, 1998
A police officer walks past the entrance of Thurston High School 22 May as the investigation continues following a fatal shooting the previous day. Fifteen-year-old Kipland Philipp Kinkel killed two fellow students and injured twenty-three others 21 May after he entered the school's cafeteria with a semi-automatic rifle and two hand-guns. AFP PHOTO Hector MATA (Photo credit should read HECTOR MATA/AFP/Getty Images)
Marysville Philchuck High School in Marysville, Washington -- 5 killed (including shooter), 3 injured on October 24, 2014
Women read memorial messages on the memorial wall at Marysville-Pilchuck High School, under the school sign. Taken on 11/1/2014. (Stephen Ehlers via Getty Images)
"The shooter ... asked one of the other students to stand up and when he did asked him if he was religious. The student said he was Christian and was shot," Downing said.
"He then had another student stand up and asked him the same, when he answered Catholic the shooter then asked if he believed in the afterlife. The student said I don't know and the shooter thanked him for standing up for his beliefs and shot him."
A woman on the floor "said she was sorry for whatever happened to him and for whatever she had done wrong," according to Downing. "The shooter then said that he bets she was and shot her," Downing wrote.
"I stood up and he pointed the gun at me and this is the moment I thought I was going to die."
Mathew Downing, survivor of the Oregon shooting
Harper-Mercer reloaded his two handguns from ammunition in the backpack, Downing said. Police arrived and the gunman "leaned about half of his torso out of the classroom to fire on the police."
"The shooter leaned out of the classroom about two times and was shot by one of the officers then retreated into the class," Downing said. "When this happened, he laid down on the ground and shot himself in the head."
President Barack Obama traveled to Roseburg Friday to meet with the families and surviving victims of the mass shooting.
Downing said he wrote his account of the shooting in order to "get my story out in a way that I feel comfortable."
"The final thing I want to add is that I and everybody else should get from this is that any day could be your last," Downing said in the statement.
"You don't want anybody's last memory of you to be a bad one so everybody needs to take it upon themselves to just be a lot nicer to people," he said.
WATCH: Meet the first responders who came face-to-face with a mass killer: