TAOYUAN, Taiwan — As the batter steps to the plate, the clamor reaches its crescendo, a rhyming, thumping chant, often tailored to his name.

Cheerleaders prance atop the dugout, accompanied by blaring recorded music or even live drums and brass instruments. Fans wield all manner of noise makers — clappers, pairs of plastic bats, small vuvuzelas — pretty much nonstop for nine innings.

They are not trying to distract from the opposing team’s batter, but to cheer on their own. How any batter manages to concentrate enough in the din to get a hit is anyone’s guess.

“Yi qi an da! Yi qi an da!” (pronounced ee-chi-ahn-dah) goes one of the more general chants, which is, roughly, the way to say, “Let’s get a hit together.”

To say baseball is a national obsession in Taiwan might be an overstatement since its fortunes have risen and fallen over the years. It does, however, seem deeply ingrained in its national identity as a small but spirited bastion of democracy.

The 500-note of the island’s currency, the New Taiwan Dollar, depicts a baseball team, paying homage to its phenomenally successful youth teams, which, as any ex-Little Leaguer of a certain age will recall, dominated the Little League World Series from 1969 to 1996, winning 17 of 28 finals.

For all its obvious connections to the American pastime, baseball is not an American import. It came through Japan, where baseball had already been played for a quarter century when the Japanese seized Taiwan in 1895. At the time, Taiwan was controlled by the Qing-era rulers of China.

After the forces of Chiang Kai-shek retreated to Taiwan and established the Republic of China following the Communist Revolution in 1949, the new government sought to erase the vestiges of Japanese rule, except for baseball.

Teams have formed and folded, the league expanding and contracting. Scandals over gambling tarred the game. In 1996, gangsters kidnapped players who apparently did not follow through on a fix.

An even broader betting scandal erupted in 2008, leading to accusations against scores of players for accepting cash and sex with prostitutes to fix games. One team was expelled; another withdrew.

A year later scandal flared up again, implicating players from the Brother Elephants, one of the league’s most popular teams.

Attendance plummeted. Some blamed the scandals, but others blamed the increasing numbers of foreign players.

At the game’s nadir in 2009, Taiwan’s government and league executives intervened and vowed to clean up the sport, improving salaries and policing gambling more aggressively.

The league since then has settled down with four teams: the Lamigo Monkeys; the Uni-President 7-Eleven Lions, named after the convenience store, which is ubiquitous here; the Chinatrust Brothers, the franchise that emerged from the tainted Brother Elephants; and the newest, the Fubon Guardians.

The Monkeys, winners of the championship three of the last four years, play their home games in a stadium beside the high-speed train station in Taoyuan. The Guardians signed a lease last December to play theirs in a stadium in New Taipei City. The other teams rotate among several stadiums, though they are broadly associated with their cities: the Uni-Lions in Tainan and the Brothers in Taichung.

There is a consensus the league has been making a comeback. One reason is the most famous foreigner to play here: Manny Ramirez, a player with a stellar, though checkered career in the United States.

In 2013, after two suspensions for violating Major League Baseball’s drug policy, Mr. Ramirez came to Taiwan. While he played in only 49 games, attendance soared and it has remained steady since.

(His presence might have been fleeting, but he was here long enough to be the source of what is arguably the most memorable home run calls by a television announcer. Ever. “This ball is long gone,” he shouted, punctuating each word, “just like the ex-girlfriend who will never return!”)

While the league might not have the renown of Japan’s professional league, it has sent a dozen players to the Major Leagues, and continues to attract foreign players.

“On the road it’s the worst,” said Michael Nix, an American pitcher for the Monkeys, describing the hometown cheers for the batters he has to face. “You get used to it.”

Attending games at the stadiums can feel like a tailgate party that rolls right into the stands before turning into an aerobic workout. Everyone seems to know not only the words to a lineup’s worth of chants, which have a delirious mix of English and Chinese, but also the dances that go with them.