WILKINSON, Ind. — Many people in basketball-obsessed Indiana claim to eat, sleep and breathe the game. This summer, in a microscopic rural town about 30 miles outside Indianapolis, a house went up for sale that would give its occupants little other choice.“Rare opportunity for your very own high school gym,” began the listing for the Wilkinson High School gymnasium, which was erected in 1950, fell out of use two decades later and at some point afterward underwent a perfunctory residential conversion.Kyle and Lauren Petry were not looking for a new home when they stumbled upon the listing, and they certainly had no interest in one built inside the rickety skeleton of a 72-year-old gym. But because they lived nearby, because it all seemed so absurd, they stopped in for a look.The pictures, they thought, had not done the space justice. They were awed by its cavernous proportions — most of the 11,000-square-foot gym was left untouched — and humbled by its antique aura. Then they walked away, happy to leave it in the realm of fantasy.A week and a half later, while sitting in church, the couple experienced a moment of clarity. They wanted to own it, they realized. They called the real estate agent that morning and made an offer. It was accepted before they went to bed.The concept of home-court advantage, for the couple and their three children, suddenly took on new meaning.“It was the strangest thing I’d ever heard of,” Lauren Petry said of the house, “and the coolest thing I’d ever heard of.”Lauren Petry in front of the gym. “It was the strangest thing I’d ever heard of, and the coolest thing I’d ever heard of,” she said.Lee Klafczynski for The New York TimesLittle did the Petrys know their house-hunting fever dream was only beginning. The next morning, Roy Wilson, the couple’s real estate agent, called to tell them that the listing had gone viral on social media, seemingly overnight, and was being covered in several news outlets.In the age of Zillow surfing — the sort of aimless, daydreamy scrolling of real estate sites that became something of a national pastime at the height of the coronavirus pandemic — the listing was pure catnip. The whimsical text oozed small-town charm. The rustic pictures evoked childhood emotions. The kitchen and living room, featuring the original maple floor and regulation basketball lines, seemed like sight gags. (Not everybody was seduced: “I have zero fond memories of high school gym,” someone replied to a Tweet from the account Zillow Gone Wild.)Calls from journalists and curious buyers from as far away as Singapore soon flooded Wilson’s office. The Petrys’ winning offer that Sunday — for $300,000, a hair more than the list price — had been only the fifth bid in three weeks. In the three days after the listing went viral, there were 49 more, some of them for well over double the price, the Petrys were later told.Wilson, 71, whose high school graduation ceremony had been held in the gym, could not offer the callers much. The Petrys’ bid had been accepted, meaning the wave of eager buyers had to be turned away. And because the deal had not closed, he could not publicly name the family. Photographers and camera crews showed up at the gym anyway, trying to get pictures through the windows.“It was a hubbub,” said Cheryl Middendorf, 68, who attended school in the district. She now runs an insurance agency a couple of blocks from the gym that is one of the few businesses in Wilkinson, which has a population of only a few hundred people.Among miscellaneous furniture, boxes await unpacking.Lee Klafczynski for The New York TimesThe viral moment faded as quickly as it appeared. The worldwide attention subsided. What remained, though, was a quintessentially Hoosier story, one whose ending is still being written.The Petrys — who have three children: Carson, 12; Kaylynn, 9; and Kyla, 8 — said they want to refurbish the court and open it up somehow to the Wilkinson community. They have pondered starting a partnership with the school district or simply hosting events, like pickup games and movie nights, on their own. They both grew up in the area (and met while riding horses in the fifth grade) and now feel a responsibility to honor the history of the building.In many ways, they have their work cut out for them. The space is enormous: More than half the original gym, with its weathered gray bleachers, was left in its original form. The previous owners then constructed a bilevel, three-bedroom home in the remaining area inside the structure. The gym can be entered from a door in the living room, and the court can be stared at from any number of large windows in the home.The Petrys realized one night that a colony of bats had taken up residence in one corner of the gym. Spiders continue to emerge all over the house. Moving has been a slow process, but they have positioned a dining table in the kitchen, near the top of the key, and plan to install an island inside the paint.“We’re still walking around here thinking, ‘What did we just do?’” said Kyle Petry, who estimated the cost of renovations, over a period of years, would eventually exceed the original cost of the home.The people of Wilkinson are rooting for them, waiting to see what happens next, well aware of what is at stake.Basketball maintains a fervent following in Indiana, and the state’s high school gyms from the first half of the 20th century occupy an almost spiritual place across its landscape, like the bygone churches dotting the Italian countryside.Kyla Petry rides her bike around the boxes.Lee Klafczynski for The New York TimesSeveral nearby gyms have their own claims to fame. A 20-minute drive east, for instance, will take you to the New Castle Fieldhouse, the largest high school gym in the United States. Ten minutes in the other direction is the former high school court where much of “Hoosiers,” the 1985 film starring Gene Hackman that captured the state’s deep reverence for the game, was filmed.“Most of these country schools didn’t have enough boys for football, so basketball was king,” said Neil Shaneyfelt, the board president of the Hoosier Gym, which operates today as a museum and event space. “The crops are in, so what do we do for entertainment during the cold months in Indiana? You might as well have shut the towns down, because everybody came to the ballgames.”Other than churches, gyms were often the only large communal spaces in these rural towns. Along with basketball games, they hosted sock hops, ice cream socials and graduations.Wilkinson was no different. Greg Troy, 72, grew up six miles north of the school, watched games there as a young child and eventually played for the varsity team. He recalled the thrill of seeing the bright lights of the gym from the main road on the way to Friday night games, knowing the room would be packed.“It was always noisy,” Troy said of the building, “always smelled good, like popcorn.”The tragedy for old-timers and basketball lovers is that so many of these storied Indiana gyms have fallen out of use. In 1959, a state law forced hundreds of tiny school districts to consolidate. That year, there were 724 basketball-playing high schools in the state, according to a 2009 story in the Indianapolis Star. Fifty years later, there were 402.Some gyms have been saved, with at least a few others becoming private homes. Others have fallen into disrepair. Many are gone altogether.Kyle Petry, right, and his father, Scott, examine carvings on an original wooden school desk left in the home.Lee Klafczynski for The New York TimesThe Wilkinson gym started to fall out of use when the school consolidated with nearby Charlottesville High School in 1965. The building was sold in the 1970s to a local family seeking a larger space for its hardware store. For a time the family also used an adjacent classroom building — which has since been demolished — as a restaurant serving homey classics like beef Manhattan and pork, beans and potatoes.“People would come in and say, ‘Huh, this is the old basketball floor, isn’t it?’” said Terry Molden, 79, who owned the store with his family. “And I would say, ‘Yeah, and you’re out of bounds.’ ”Two decades ago, the Molden family sold the gym to Jeff and Christy Broady, a local couple, who lived in the gym while gradually constructing the home, piece by piece, all around them. The price back then was $85,000, according to Wilson, who worked on the deal, with few people interested.Today, people have been clamoring to get inside.Soon after the Petrys moved in, a few local children followed the Petrys’ kids off the school bus and into their home to play. The next day, there were a few more. The number kept trickling upward, until one day there were almost 20 children shooting hoops and riding bicycles around the court.“I was like, ‘Do your parents know that you’re here?’” Lauren Petry said, laughing.Older residents have taken notice, too. The day before the family moved in, an anonymous visitor dropped off a box of black-and-white photos of the gym with a note that read, “I think you should have these.” The Petrys were also given a dust stack of yearbooks from the 1950s.The Petrys have a photo showing the construction of the Wilkinson High School gym.Lee Klafczynski for The New York TimesPeople continue knocking on the door, asking to see the place, reminiscing about little life events from long ago.In this spirit, the Petrys have decided to reserve one entire wall near the front door of the house, where the concession stand used to be, as an exhibition space to hang memorabilia from the school. They have a classroom desk that students carved their names into a century ago. A local collector offered to donate a varsity cheerleader uniform from the ’50s.“It’s this little time capsule where you can go back and remember a time when things were slower,” Lauren Petry said of her odd, new home. “Basketball takes you back to that, that nostalgia, that warm feeling. I think people are responding to that. Their hearts gravitate toward it.” More