NEW DELHI  A simmering feud among a group of eighth graders exploded Tuesday in an upscale suburb south of this capital city in a rare school shooting that killed one student.

The police detained two 14-year-old boys in the death of the student, also 14, at Euro International School in Gurgaon, one of India’s flourishing outsourcing hubs.

Guns have been a growing menace in Gurgaon, the police said.

Satish Balan, the deputy commissioner of police for Gurgaon, said one of the boys brought his father’s gun to school, hidden in a sock. Shortly after school, the boy and a classmate confronted a third student, Abhishek Tyagi, in a school hall and took turns shooting him, apparently at close range, the police said.

The victim arrived at Pushpanjali Hospital with two bullets in his chest and one in his head.

The boys had been quarreling for several days, Mr. Balan said, so much so that the principal had called their parents to school and recommended meditation.