DETROIT (AP) _ A summer spate of shootings and the highest murder rate in the country have officials groping for ways to suppress firearms violence plaguing the nation's sixth-largest city.

Police records show that 266 people were shot in June, 42 of them fatally. During a single weekend there were 12 fatal shootings. In July, 307 people were shot and 51 died.

On Wednesday, the first day of school in Detroit, a 15-year-old ninth- grader was shot and critically wounded outside his high school, the victim of fellow students, according to police. Since June 1, more than a hundred people age 16 or younger have been shot in Detroit.

Community leaders blame the carnage on drugs and a sense of hopelessness among the city's young people. Ministers have called on Mayor Coleman Young to back a handgun ban, but Young and the City Council have balked.

''I don't think it's going to have any impact on crime at all to ask the people who are being shot at to give up their guns,'' Young said Wednesday in an interview with WJR Radio.

There are reasons for concern:

- On Sunday, a 7-year-old girl and her 3-year-old brother were seriously injured when bullets sprayed their house while they slept. Police believe the shooters thought someone in the home had alerted authorities that stolen cars were being dismantled in a nearby alley.

- The previous weekend, a 16-year-old girl was killed and a friend seriously wounded by three youths who allegedly ''shot up'' a chaperoned party they had been turned away from.

- Aug. 12, an 8-year-old girl visiting from Houston was killed and three other children were injured when gunfire strafed a home from a passing van. Police know of no motive.

- On the city's bloodiest weekend of the summer, June 27-29, 43 people were shot and 12 killed.

''You don't have to be doing nothing wrong,'' said 39-year-old Randall Stewart, one of that weekend's surviving victims. His right forearm was shattered by a bullet fired by a driver who nearly collided with Stewart's car.

''Just be in the wrong place at the wrong time and then, boom,'' he said in an interview with The Detroit News.

Unemployment in the city stands at about 20 percent and is about 50 percent among teen-agers. And poverty ''invites the escape to drugs,'' said Young.

''I think the overwhelming factor is a sense of hopelessness among city residents,'' said Gregory Hicks, vice president of the Detroit Urban League.

''Parents have lost control their children, especially boys, because there is no father figure in the home,'' said the Rev. James Holley, pastor of the Little Rock Baptist Church.

''What the kids are doing now, instead of killing each other, they are maiming people because the police only investigate homicides,'' he said. ''We've never had anything like this, and it's going to get worse unless somebody does something.''

Police Chief William Hart declined Associated Press requests for an interview.

Holley and other ministers want Young to lead a major effort to cut availability of handguns in the city.

''Who's going to take the guns away from these young punks who are doing the shooting?'' said Young. ''It would be disaster ... to ask the average citizen to disarm himself in view of the rampant crime.''

Since 1977, the state has enforced a felony firearm law that mandates an extra two years in prison for people convicted of crimes involving guns. But the law hasn't been a deterrent, according to a study by one criminologist.

''If you're committing a felony with a gun, you're not concerned with the two years that might be added on to that,'' said Colin Loftin, professor at the University of Maryland's Institute of Criminal Justice and Criminology.

According to the FBI's 1985 Uniform Crime Report, Detroit had the highest murder rate among the nation's larger cities last year, with 58 homicides per 100,000 people. Second was Gary, Ind., with 43 murders per 100,000 people.

Detroit recorded 254 homicides during the first six months of 1986, and the violence has bred fear and prompted more people to arm themselves.

''They don't believe the criminal justice system will protect them, so they have to do something on their own. One of the things they do is buy guns,'' said Loftin.

''As guns are more readily available outside the school, they are coming inside the school more,'' said Detroit Public Schools spokeswoman Marie Furcron.

School officials last week announced plans to continue last year's random metal detector ''sweeps'' of middle and high school students to find guns and other weapons being carried into school buildings.

They also called for parents to be prosecuted if their children were caught bringing weapons into the schools and said tougher disciplinary measures would be taken against the students themselves.