TOKYO — Record rainfall continued to batter Japan on Sunday, with millions of people being urged to leave their homes because of the risk of flooding and landslides that have already killed dozens.

Government officials pleaded with affected residents to “take adequate actions and follow evacuation instructions issued by municipal governments” as forecasters predicted more rain in western and central Japan.

Yasushi Kajihara, a spokesman for Japan’s Meteorological Agency, said people trapped in their houses should move to higher floors if possible, while others should head to higher ground “to save our lives.”