An agricultural high school in Japan's northern prefecture of Hokkaido -- its survival once at stake due to a shortage of students -- has bounced back by earning fame through the delicious lamb produced by its students.

The Embetsu agricultural high school, the sole high school in the town of Embetsu in northern Hokkaido, has about 60 students and owns around 25 hectares of land used. It keeps around 20 to 40 Suffolk sheep, a breed from Britain, with students mainly handling the breeding of animals and processing of meat.

"This is the only high school in the country specialized in lamb production and processing," said Uriel Ishikawa, 28, who teaches students how to raise sheep.

At school events, it has sold meat processed into lamb slices, ground lamb and sausage. But it had been struggling due to the declining number of incoming students, leading authorities to consider whether they should close the school.

The turning point came about four years ago, when the town began sending the school's lamb products as one of the return gifts to people who donated money to the municipality under the country's so-called hometown tax donation scheme.

The donation system launched in fiscal 2008 provides tax deductions to people who donate to a local government of their choice and it has become popular because of attractive and unique gifts offered by local governments in return for donations.

The lamb produced by the school became a huge hit, with people who received the gift praising the meat as "tender and tasty."

The amount of donations to the town surged to around 140 million yen ($1.23 million) in fiscal 2017 from around 6.6 million yen in fiscal 2014. Among the gifts, lamb is so popular that it often runs out of stock.

Along with the spread of a reputation for its signature lamb, the school enrolled 26 new students, surpassing the minimum requirement level of 20 students for merger or closure considerations, for this academic year.

"These are results far beyond what we expected," a town official said.

Students at the high school feed the animals, clean the sheep shed and keep a close eye on the health of each animal, reporting such observations as one was "bleeding from its leg" or "dung was softer than usual."

Ryunosuke Ohashi, one of the students, said, "The sheep is a delicate animal. We try not to overlook small changes in the animals as part of efforts to maintain the quality of our products for consumers."

Feed for the sheep is mixed with broken rice, an idea that came from the students.

Now the school even attracts students from outside Hokkaido.

"The increase in the number of high school students will vitalize the town," said Tatsuhiro Nomura, an Embetsu town official who handles matters related to the hometown tax.

In fiscal 2016, tablet computers purchased with the hometown tax donations were leased to all students and used in class activities.

"While taking care of lives (of animals here), I want the students to also learn advanced technologies so that they will become capable professionals who will lead farming in the future," said Yuji Sato, the principal of the high school.