A notorious north Indian bandit chief committed crime after crime without being caught, but last month he went too far. He embarrassed government officials and police by openly holding court in his home village while a newspaper reporter took notes. The resulting front-page publicity sealed his fate.

According to the stories, it was a triumphal homecoming for Chhabiram, a 42-year-old bandit chief of the Jesse James stripe whom police seemingly never could find. He accepted the adulation of his people, settled village disputes, organized a poetry reading and performed Hindu rites.

But the furor that followed the newspaper stories galvanized the police into action as the price on his head never had. They mounted a military-style assault and chased Chhabiram and his gang of dacoits, as they are known in India, through the deep ravines of the rugged Chambal Valley that for 500 years has provided safe haven for bandits.

Chhabiram was cornered and killed last Wednesday after a two-week chase. He and 12 of his gang were gunned down in a 90-minute battle involving, according to reports received here, 50 grenades tossed by the attacking police and a fire fight with both sides using light machine guns.

As an object lesson, the police displayed the 13 bodies tied to poles stuck in the ground in the main square of Maipuri, a town just seven miles from the village of Harnagarpur where Chhabiram had played conquering hero just a month earlier.

Chhabiram was one of three major dacoit chiefs whose gangs roam apparently at will, killing and kidnaping, in the Wild West setting of the Chambal Valley, less than 200 miles from India's capital and a short drive from its most famous tourist attraction, the Taj Mahal.

Dacoits have become folk heros in that part of India--combinations of Robin Hood, Jesse James and Bonnie and Clyde--who generally are protected by villagers and reportedly courted by local politicians.

Mostly low-caste Hindus, they rob the rich and keep the untouchables in their place. Their escapades have become legends as they are recounted in exaggerated fashion in popular magazines and "Curry Westerns" turned out by the Bombay film studios.

Boys in poor villages around the Chambal, where farmers barely scratch out a living from the harsh land, would rather be dacoits than policemen. For one thing, it pays better.

Even the girls have their dacoit idol--25-year-old Phoolan Devi, who on Valentine's Day 1981, staged the massacre of 20 men in the small village of Behmal, reportedly purely for revenge. According to Hindustan Times editor Khushwant Singh, who visited Behmal earlier this year, the men had murdered one of her lovers and beaten and raped her some time in the past.

As with most reports of dacoits, it is hard to separate fact from fiction with Phoolan Devi. She is blamed for 30 killings in the past 18 months, and reputedly has taken as many lovers in the same time. The popular press describes her as a beautiful bandit, but people who have seen Phoolan Devi say she is short and squat and has a pockmarked face. Police have no pictures of her.

What is important, however, is that more than a year after the massacre she has not been caught despite a massive police hunt. Moreover, residents of Behmal still refuse to tell police exactly what happened or why Phoolan Devi attacked the men there. A code of silence as strict as the Mafia's appears to govern the area.

If Phoolan Devi is the queen of the dacoits, the reigning and undisputed king--now that Chhabiram has been killed--is Malkhan, 38, who is reported to swagger around the Chambal Valley wearing a police uniform bearing a superintendent's insignia.

He and his gang, who operate from the unmapped, twisting ravines and cross the Chambal River to prey on rich farmers and landowners, are blamed for more than 100 kidnapings and murders. Like Robin Hood, Malkhan is reputed to distribute some of the booty to poor peasants, who protect him and supply food and shelter to his gang.

It is this support from the villagers, along with reputed protection from politicians and payoffs to police, that allow dacoits to operate so freely. The roads twisting north from Agra, the site of the Taj Mahal, to Corbett National Park, a popular tourist attraction, are considered unsafe at night because of the dacoit menace.

It is hard to prove the political payoffs, but the charges surface frequently in India's Parliament and in state assemblies. One small-time dacoit was captured by police in New Delhi last week while staying at the home of a minor official of Prime Minister Indira Gandhi's ruling Congress-I Party.

Candid police officials say that it is the dacoits' popularity with villagers and their ability to deliver large blocs of votes that make them important to local politicians.

It was clear, however, that Chhabiram had gone beyond the pale and that no political friends could help him once Niraj Roy, a reporter with the Indian Express, tracked him in early February to his village of Harnagarpur.

According to Roy's front-page story, thousands of people came to meet "Netaji," as Chhabiram was called. Although he was dressed in simple peasant costume, his followers wore police uniforms and carried a veritable arsenal of weapons, including automatic rifles, carbines and grenades.

"Chhabiram embraced me with a smile," Roy wrote. "What is there for me to say? All of you write untruths," Roy quoted the dacoit chief as saying.

Chhabiram was quoted as adding, somewhat prophetically, "If I say anything, you will write it and the government will create more problems for us. No, I have nothing to say. You may stay with us for a while though."

That was Chhabiram's undoing. Vishwanth Pratap Singh, the chief minister of Uttar Pradesh, the state where Chhabiram had operated with impunity for years and where he was charged in more than 150 cases of murder and banditry, ordered a police dragnet the likes of which the Chambal Valley never had seen before. It was aimed at tightening a noose around the area in which the dacoit chief and his gang were thought to be.

For once the police were right. Moreover, they had a major advantage over the dacoits: they could negotiate the rugged countryside in jeeps while Chhabiram and his men were forced to retreat on foot.

Finally, around 5 p.m. Wednesday as dusk was falling over the valley, police closed the net around the dacoits, who were hiding in a protected rivulet that officials later described as the best place in the region to dig in for a defensive battle.

Karamaveer Singh, the senior police superintendent who had been trying to capture Chhabiram for the past eight months, described the dacoit chief as being cool to the last--puffing on a cigarette as he tried to hold the police at bay, possibly in the hope he might escape once night fell.

His legend is sure to live on.