Artificial intelligence’s integration into everyday life has stirred up doubts and unsettling questions for many about humanity’s path forward. But in Anguilla, a tiny Caribbean island to the east of Puerto Rico, the A.I. boom has made the country a fortune.

The British territory collects a fee from every registration for internet addresses that end in “.ai,” which happens to be the domain name assigned to the island, like “.fr” for France and “.jp” for Japan. With companies wanting internet addresses that communicate they are at the forefront of the A.I. boom — like Elon Musk’s X.ai website for his artificial intelligence company — Anguilla has recently received a huge influx in requests for domain names.

For each domain registration, Anguilla’s government gets anywhere from $140 to thousands of dollars from website names sold at auctions, according government data. Last year, Anguilla’s government made about $32 million from those fees. That amounted to more than 10 percent of gross domestic product for the territory of almost 16,000 people and 35 square miles.

“Some people call it a windfall,” Anguilla’s premier, Ellis Webster, said. “We just call it God smiling down on us.”

Mr. Webster said the government used the money to provide free health care for citizens 70 and older, and it has committed millions of dollars to finish building a school and a vocational training center. The government has also allocated funds to improve its airport; doubled its budget for sports activities, events and facilities; and increased the budget for citizens seeking medical treatment overseas, he said.

The island, which relies heavily on tourism, had been hard hit by the pandemic’s restrictions on travel and a devastating hurricane in 2017. The .ai domain income was the boost the country needed.