Ranganath, 60, principal of the Havanur Public School in suburban Agrahara Dasarahalli, was holding classes for 10th standard students when the gang barged into the classroom and hacked him to death, they said.
They later fled in the car in which they came to the school, police said.
One of the gang members was nabbed later from Mahalaxmi Layout area in Bengaluru, based on a tip-off.
The man suffered a leg injury when police fired at him after he attacked them. He was later taken to a hospital and treated.
Police suspect a land dispute relating to the school building to be the reason behind the killing.
And the crime capital of the country is...
Has crime reduced in Bihar?
What have UP's 1,350 encounters achieved?
The crime no one wants to talk about