One of those wounded was a teacher and the rest were students at Oxford High School in Oxford, Michigan, about 40 miles (65 km) north of Detroit, the Oakland County Sheriff’s Office said.
The motive of the shooter was unknown, officials said.
Those killed were a 16-year-old boy, a 17-year-old girl and a 14-year-old girl, Undersheriff Michael McCabe told reporters at the scene.
Two of the wounded were in surgery and six were in stable condition, McCabe added.
The suspect, a sophomore at the school, was believed to have acted alone and was arrested without resistance after firing 15 to 20 shots, McCabe said.
“The whole thing lasted five minutes,” McCabe explained.
“The suspect divulged nothing to police and demanded his right to a lawyer on being advised not to speak by his parents, McCabe said.
“My heart goes out to the families enduring the unimaginable grief of losing a loved one,” President Joe Biden told reporters while touring a Minnesota technical college.
The latest in a long series of U.S. school shootings will likely fuel debates about gun control and mental health care, with many states allowing easy access to firearms while mental health disorders frequently go untreated.
“This is a uniquely American problem that we need to address,” said Michigan Governor Gretchen Whitmer, who rushed to the scene and appeared with McCabe before the media.
Student Abbey Hodder told the Detroit Free Press she was in chemistry class when she heard the sound of glass breaking.
“My teacher kind of ran out and was scrambling,” Hodder, 15, told the newspaper.
“The next thing I knew I saw he was pushing tables. It’s part of school protocol to barricade, so we all knew, barricade, barricade down. And we all started pushing tables.”
McCabe praised the school for its preparation for a shooting and an orderly evacuation.
The shooting underscored how students must decide when to emerge from shelter once the gunfire stops.
Video posted on social media showed students huddled in a barricaded classroom while someone outside shouts through the door that it is safe to come out, identifying himself as being with the sheriff’s office.
But the teacher responds: “We’re not taking that risk,” and incredulous students who feared the shooter might have been trying to lure them into the hall escaped out a back window and were soon met by uniformed deputies.
Oakland County Prosecutor Karen McDonald promised swift justice, saying in a statement: “It is our intent to review it (the investigation) thoroughly and issue appropriate charges quickly.