When the news spread this week that Britain would send back to India its best “chess prospect in a generation,” more than a few people were astonished. But on Friday, British authorities appeared to change their minds, saying they may allow the 9-year-old chess prodigy, Shreyas Roya, and his family to stay in the country after all.

“Shreyas’s jumping and dancing,” the boy’s father, Jitendra Singh, said in an email. “Tears came out from my wife’s eyes.”

The family’s future in Britain had seemed bleak. The five-year visa that Singh, an information technology projects manager, had been granted to work for Tata Consultancy Services in Britain could not be extended once it expired in September.

Britain’s Home Office said there could be no exception. “There is no route within the immigration rules which would allow the family to remain in the U.K.,” a spokesman for the Home Office said Thursday.

But on Friday, Singh said, “We got good news.” Singh said the Home Office had informed him he would be allowed to apply for a new visa based on his son’s exceptional talent.

It was not clear why the Home Office, which did not respond to requests for comment Friday, changed course. But according to The Times of London, the government decided to waive its requirement that a new application had to occur from outside the country, and said that the application would be sponsored by Tata.

Immigration law in Britain allows for visas to be granted to those with “exceptional talent” or in certain areas of “sport.” Dominic Lawson, the president of the English Chess Federation, described Shreyas as “England’s best junior chess prospect in a generation,” but he noted that chess mastery apparently did not qualify as an exceptional talent in a sport.

The case drew the attention of British members of Parliament, two of whom, along with Lawson, appealed to Sajid Javid, the British home secretary, to intervene. Lawson said Friday in an email that he welcomed the reversal by the Home Office.

“We at the ECF are delighted that our efforts to persuade the government to recognize Shreyas Royal’s exceptional talents have borne fruit,” he wrote. “We are also grateful to Sajid Javid for personally taking charge of re-examining the original decision of the immigration department.”

Shreyas Royal, 9, who has been hailed as Britain’s greatest chess prospect in a generation, and his father, Jitendra Singh. After being told that the family would have to return to India when Singh’s work visa expired, the British Home Office granted them an exception on Aug. 10, 2018.

Shreyas arrived in London from India with his family when he was 3 years old. He learned chess in south London, drawing accolades when he competed for England in international tournaments, earning the title of Candidate Master. He is ranked fourth in the world for his age group.

Shreyas, who is competing in the British Chess Championships, has said his dream is to become world champion before the age of 18.

Singh told The Times of London that he believed the home secretary stepped in to find a solution to his son’s case.

If granted, the new visa would allow Singh to stay for an additional five years and open the way for him and his family to settle in Britain permanently.