TOKYO — For nearly a month, as the coronavirus has threatened the health and economy of Japan, Prime Minister Shinzo Abe has been almost invisible.

Public health officials, not Mr. Abe, became the face of government ineptitude when a troubled quarantine of a cruise ship led to hundreds of infections on board and the risk of further cases on shore. Those officials have also been left to explain why the government’s testing for the virus has been stuck at around 900 patients a day, even as neighboring countries test up to 10,000.

In the past week, a backlash from an angry and confused public has finally forced Mr. Abe to take more of a front-line role, but his clumsy efforts have only succeeded in deepening the biggest political crisis of his more than seven years in office — the longest tenure of any Japanese prime minister.

Mr. Abe’s approval ratings have plummeted to the upper 30s in some polls. Last weekend, after he held his first news conference on the crisis — a scripted affair with prearranged questions that left Japanese journalists shouting at him for answers — Twitter was flooded with over a million posts demanding his resignation. Two days before, after weeks of inaction, he had blindsided parents by asking the nation’s schools to close for a month, sending many scrambling to find child care.