The circumstances surrounding the near breakup of SMAP underlined the idol group’s sustained popularity, as evidenced by exceptional TV ratings, the apparent overloading of Twitter’s servers and the fact that it drew comment from the prime minister.

“The group will remain intact in response to many fans’ wishes, which is good,” Prime Minister Shinzo Abe said during Tuesday’s session of the Upper House Budget Committee. “As is the case in the world of politics, I presume there are many issues (that must be overcome) for a group to continue for many years.”

SMAP fans let out a collective sigh of relief Monday night when the veteran boy band announced plans to stick together amid speculation that they were on the verge of breaking up.

During a closely observed special live TV appearance on the weekly show “SMAP X SMAP,” the unit’s members, dressed in somber dark suits, bowed deeply and tersely apologized for causing their fans “great concern.”

As they bowed, the audience rating for the Fuji TV program shot up to 37.2 percent in the Kanto region, according to Video Research Ltd.

The ratings in the Kanto and Kansai regions averaged 31.2 percent and 29.7 percent, respectively.

The only TV program to have achieved a rating above 30 percent in Kanto in 2015 was NHK’s year-end “Kohaku Uta Gassen” singing battle show, the company said.

As the huge numbers of people watching the program turned their attention online to post comments, Twitter flashed an error message, which many interpreted as a sign of server access overload.

In the carefully scripted speech that lasted less than five minutes, the idols — most now in their 40s — made no direct reference to recent news reports rumoring disbandment. They emphasized their solidarity and asked fans for continued support.

It was their first public appearance since news of the rift surfaced last week.

“Starting today, we once again want to make you smile,” member Shingo Katori said — though there was a conspicuous absence of smiles during the announcement. “I’m relieved the five of us are here together,” Tsuyoshi Kusanagi said.

“We will keep moving forward, no matter what,” Takuya Kimura said.

The five were able to come together because, Kusanagi revealed, Kimura “made it possible for us to apologize” to Johnny Kitagawa, the octogenarian president of the powerful talent agency Johnny & Associates.

A scandal emerged last week in which Katori, Kusanagi, Masahiro Nakai and Goro Inagaki were reportedly considering leaving Johnny & Associates after their longtime female manager, rumored to exert a motherly influence over the members, was pressured to resign amid a feud with a company executive. Kimura alone intended to stay with the agency, according to reports.

Kimura, in diplomatic terms, acknowledged during the live announcement that the possibility of splitting had arisen, but he did not elaborate.

On social media, some people were quick to criticize the speech, saying it sounded forced and, some thought, was ambiguous regarding their future.

“Are they going to break up or what? They didn’t make that super clear,” said SMAP fan Nattsun. “Believe me, they were forced to say what they said. That was not their true feelings. That was not SMAP.”

“They are only here because they apologized to the president?” asked another Twitter user, from the account @girliennes. “It’s almost like they are being forced to pledge allegiance to their agency on a national television network.”

In a blog post Monday, economist Nobuo Ikeda described Johnny & Associates’ “victory” in retaining SMAP members, saying the group had been defeated by an entertainment industry cartel, as “no other talent agency uses artists who have gone independent” from an agency.

“This is Japanese society in miniature,” wrote Ikeda. “Salarymen, who are typically hired right out of school in a batch . . . will start by learning (elementary skills) on the job. These include company-specific skills learned by watching more experienced workers, like personal skills, meaning they aren’t useful in other companies.

“As companies rarely hire mid-career, this situation is like the entertainment industry where those who go independent will never have a second chance,” he said.

Monday’s TV appearance seemingly brought closure to the weeklong speculation that dominated headlines nationwide and left millions of SMAP fans across the globe on edge.

The four members’ departure from Johnny & Associates would almost certainly have resulted in the breakup of SMAP, whose songs frequently top the charts and whose popularity spans generations.

Despite their entrance into middle age, the members are still fixtures on TV, radio and commercials and are reportedly worth ¥20 billion.

When the quintet’s disbanding appeared imminent, a movement emerged among fans on social media to demonstrate their loyalty by buying CDs of SMAP’s best-known single, “Sekai ni Hitotsu Dake no Hana.”

As a result, on Friday, the 2003 song reportedly jumped to No. 9 on the Oricon music ranking charts.