KAKKAR, India — Sitting cross-legged with his long white beard flowing in the afternoon wind, the 95-year-old man took a deep breath and began leading a dozen or so other Sikhs in chanting a sacred verse in praise of their god.
“Your name is the truth, the wondrous teacher,” the nonagenarian, Karnail Singh Kakkar, said in Punjabi.
A half-hour later, the prayers over, a big kettle was ushered in.
“Soldier, don’t you want some tea?” one of the men at the religious service solicitously asked another worshiper, Jagir Singh, 76, a retired inspector in India’s paramilitary force who had guarded a fenced border between India and Pakistan just a few miles away.
The residents of the remote village of Kakkar in northern India, which borders the Line of Control in the Punjab, a region divided by a bloody partition between India and Pakistan, are trying a locally tailored solution to a global problem: a deep sense of loneliness among older people.
It is an issue across modern societies, and one felt acutely in India, with one of the world’s largest older populations. About 140 million people 60 or older were living there last year, according to government data.
And their children and grandchildren are part of a highly mobile, urbanizing population that has left many older people, especially women, abandoned at old-age homes with little savings.
“About 29 percent of old people are living alone in our country,” said Himanshu Rath, the founder of the Agewell Foundation, a nonprofit group that provides medical and psychological support to more than 20,000 older people daily across the country.
Kakkar, a village of 3,500 people surrounded by rice and sugar cane fields, began its experiment in dealing with the loneliness of older residents almost a decade ago.
The village gurudwara, a historic Sikh temple widely believed by those in the region to be the resting place of Guru Hargobind, the sixth of 10 revered Sikh gurus, had always played a central role in local milestone events: weddings, births and funerals. After residents purchased a tractor or car, their first stop was typically the gurudwara.
Then about a decade ago, a group of priests looking to increase attendance began encouraging residents to spend more time at the gurudwara even on ordinary days, and a number of religious elders began doing so.
To make the gurudwara more hospitable, residents donated money to adorn the walls with floral tiles. A carved dome-like structure made of white marble was added to the main hall, where the Guru Granth Sahib, the Sikh holy book, would be kept. Carpets and air-conditioners were purchased. And the residents ensured that the traditional langar, or free community meal, was always sumptuous, with enough food for second or third helpings.
Soon enough, the temple was attracting not only the deeply religious, but also villagers who had not previously been regulars, many of them in their 60s, 70s and 80s. They had longed for companionship, and now had somewhere to find it.
“We thought if they could be together, maybe they would feel less lonely,” said Gurlal Singh Kakkar, 53, a farmer and the son of the 95-year-old Mr. Kakkar. The elder Mr. Kakkar started riding his bicycle to the gurudwara every day to join the group. His wife, Jagtar Kaur, 92, would sometimes ride there, too.
Others arrive on foot, walking sticks in hand.
On a recent afternoon at the gurudwara and its grounds, some men sprawled on charpoys, beds made of ropes, under a java plum tree. Others sat in an outdoor enclosure in the complex, where they prayed, listened to Punjabi songs and discussed their personal problems, buoyed by endless rounds of chai.
“We come here because of our loneliness,” said Baldev Singh, 74, a frail man who retired as a sergeant in the Indian Army. “Nobody listens to the old man in the house,” Mr. Singh added. “These days, young boys get a motorcycle and a mobile phone as soon as they grow up. We went to school in our underwear!”
In a washing area with a row of sinks, older women took turns scrubbing steel plates, spoons and a giant pot as part of “seva,” or selfless service, a tenet of Sikhism that seeks to promote oneness and love among all.
“If I don’t come here, I can’t digest my rotis,” said Lakhwinder Kaur, 72, who performs a daily ritual of service at the gurudwara. “We work, we talk and we pray,” she said, while enjoying a spoonful of rice pudding on her break. “What else do we need?”
There are roughly the same number of men and women at the gurudwara, but they tend to gather separately and adhere to traditional gender roles, with the women more often taking on cooking and cleaning tasks while men chat over chai. But both have found a sense of community.
For Jasbeer Kaur, 70, who has been volunteering at the gurudwara for four decades, and other women in her group, their roles were clear. “I tell them, ‘Take the god’s name and contribute service,’ not gossip,” she said.
Nearby, a group of women discussed their sons and daughters-in-law in muffled voices inside the latticed hall of the gurudwara, some lying on the carpeted floor. “They say, ‘What do you know? You’re so old,’” Ninder Kaur, 62, a widow, explained.
“We wash dishes and talk about our daughters-in-law,” Pyaaro Kaur, 60, chimed in, laughing and covering her mouth with a blue dupatta that was draped over her head. “This is how we lighten our moods.”
Then, she looked down at the carpet. “I love being out,” she said, explaining how women from the village had traveled together in a truck to New Delhi last year to participate in a yearlong farmers’ protest.
In Punjab, an agrarian area, farm plots are shrinking, and as agriculture becomes less profitable, the fabric of a deeply patriarchal society is being rewoven, according to social experts.
“Earlier, there used to be one tree under which old men could sit together all day,” said Surinder Singh Jodhka, a professor of sociology at Jawaharlal Nehru University in New Delhi. “Now, that space itself has become cramped.”
As significant as the economic shift has been, the cultural one has perhaps been even more seismic.
“Agrarian society had that kind of patriarchal authority — that with age you became more valuable,” Professor Jodhka said. “Not any longer.”
Amid all of these troubles, the elderly of Kakkar appear to have found an oasis at the gurudwara, a place where they can lampoon a younger generation obsessively tapping away on their smartphones to an understanding audience.
Indeed, as welcome as the food and air-conditioning are, the chance to jest with generational peers who get the joke is one of the biggest draws. After some good-natured ribbing about flat bellies and flabby ones, and about which widower still had a shot at a sex life, a group of men erupted in laughter.
“Now, this,” said Jagir Singh, the retired inspector, “is the secret to our good health.”