The bottom floors of another building, the Marshal Hotel, also collapsed. One person was killed there and two were missing, officials said.
Taiwan sits at the intersection of the Philippine Sea tectonic plate, which is moving west at about three inches a year, and the Eurasian plate, which extends east from mainland China. It is an area of frequent seismic activity, and earthquakes are common.
The mountainous east coast of Taiwan is less populated than its flatter western side. The region is known for its natural beauty. Hualien is close to Taroko National Park, where the famous Taroko Gorge cuts down through the mountains to the sea.
More than 90 weaker earthquakes were measured along Taiwan’s east coast in the week before Tuesday’s quake, the Central Weather Bureau reported. More than 100 aftershocks have been recorded since it struck, and the authorities warned that earthquakes of magnitude 5.0 or higher were possible over the next two weeks.
Two strong earthquakes of magnitude 5.3 and 6.1 were recorded within 45 minutes of each other on Sunday night near Hualien. The pattern of seismic activity that followed was stronger than anything that had previously been recorded in the area, Chen Kuo-chang, the acting director of the Central Weather Bureau’s Seismology Center, told the Central News Agency.
“This is unprecedented and not a normal release of energy,” he said.
While earthquakes are common in the area, the geology makes it rare to have many quakes in short succession, Mr. Chen said.
Tuesday’s earthquake in Hualien hit two years after an earthquake in southern Taiwan leveled a 17-story building in Tainan City, killing 117 people.
An earlier version of this article misstated the city in which a 2016 earthquake leveled a 17-story building. It was Tainan City, not Pingtung City.