TACLOBAN, Philippines—Framed by mountains and facing the deep sapphire waters of the Pacific Ocean, Tacloban was a city on the rise. The bustling provincial capital had a busy port and seaside cathedrals, and is just a few minutes up the road from the site where U.S. Gen. Douglas MacArthur landed to re-take the Philippines from Japanese forces in World War II. On weekends, farmers and residents of poorer towns for miles around would flock to the city to take in the latest movies or hit the malls.

In the first week of November, the city of more than 220,000 sat directly in the line of one of the most ferocious tropical storms ever to make landfall. City and national officials had days of warning and rushed to prepare. By week's end, the officials believed they had the situation in hand.

But many of their efforts, it turned out, were woefully inadequate. Some officials miscalculated the biggest threat that Typhoon Haiyan posed to the city and its surroundings. They used a term for the storm that wasn't widely understood. They grossly underestimated the havoc the storm would wreak, stocking far too few supplies for a city to survive on in an emergency. And they failed, despite vigorous efforts, to move many of the most vulnerable people out of harm's way. For almost 24 hours, local and national officials in Tacloban had no way even to call for help. They had simply failed to imagine a storm so large.

That failure of imagination, combined with residents' skepticism that the storm would be worse than any of the other 20 or so that lash the scattered archipelago every year, had a deadly and devastating impact.

In the run-up to the storm, Philippine President Benigno Aquino III, who had built his popularity in part on his government's record of effective management, called on officials to ensure a "zero-casualty" event. As of Tuesday morning, the death toll from Typhoon Haiyan reached 5,240 with a further 1,613 missing. Most of the dead were in Tacloban and the areas around it.

* * * * *

Alfred Romualdez, the mayor of Tacloban, was on vacation the week of Nov. 3, motor-biking through rice terraces in the northern Philippines with pastors from his church. He already knew a storm was developing. When he checked its progress on his iPad, he saw the churning mass was heading straight for his city, some 760 kilometers to the south.

He said he called his deputy, city administrator Tecson Lim, an enthusiastic 37-year-old who likes to hand out Tacloban bumper stickers to visitors, and asked him to brace the city for its arrival. At a meeting soon after, local officials said a prayer, asking for safety and wisdom for those whose task it was to deliver the city from the storm.

During the meeting, Mr. Lim's phone rang, he recalled in a later interview. It was the mayor again. This time, he ordered evacuations of the city's residents, many of whom lived in flimsy houses, to better-built civic buildings and schools. Mr. Lim and the other officials hoped the measure would prove unnecessary. "We were still hoping and praying it would miss us," he said.

In Manila, the national capital, government officials also were closely monitoring the progress of Typhoon Haiyan, or Yolanda, as the storm was named locally. Newly-installed Doppler radar stations gave them a much clearer picture than in the past of the storm's size and the force of the winds and the turbulence of the water within.

What they saw was alarming. The Philippine Atmospheric, Geophysical & Astronomical Services Administration, the government's chief forecasting agency, indicated the storm could have winds as strong as 260 kilometers (162 miles) per hour, officials there say.

The United States military's Joint Typhoon Warning Center in Hawaii recorded sustained winds of 314 kilometers per hour (194 miles) and gusts of 380 kilometers (236 miles) per hour. Packing that much power the storm was equivalent to a Category 5 hurricane, which the U.S. National Weather Service says means "catastrophic damage will occur," with large areas left uninhabitable for weeks or months.

Forecasters also spied a rarity: the risk of a storm surge as high as seven meters, or about 23 feet. Typhoons always bring high winds but rarely mountainous waves.

What it all added up to was the likelihood that Typhoon Haiyan might have the same impact as a massive tsunami.

With the storm's landfall anticipated toward the end of the week, officials in Tacloban and Manila began to amass defenses they thought would suffice even against a tempest of such magnitude.

The military readied three C-130 aircraft with supplies and 32 helicopters should they be needed in Tacloban and the provinces of Leyte and Samar that surround the city. Some 20 Philippine Navy ships were put on a state of heightened readiness.

Officials in Tacloban, responding to the mayor's order, devised plans to shelter many of the city's more than 220,000 residents in 23 evacuation centers. They included schools and a local convention center called the Astrodome.

Some local officials say they worried that most of the city's schools were built to withstand maximum winds of 160 kilometers (99 miles) per hour. But they decided that the structures would provide better protection than many of the city's houses, especially the long stretch of one-room shacks that ran between the bay and the ocean.

On Wednesday, Nov. 6, as the mayor rushed back to the city, Mr. Lim, the city administrator, called a news conference at City Hall, a faded two-story building with linoleum tiles, chipped wood doors and a Filipino flag. Outside, it was sunny that day, with a bright blue sky. Inside, with a deliberately stern demeanor, Mr. Lim said he tried to impart the gravity of the city's predicament to the cameras.

It "is the strongest storm that we've ever faced," he recalled saying. "People won't be able to stand" in the face of the heavy winds, he warned. "It'll be pushing cars."

He didn't mention the likelihood of a storm surge, which the forecasters in Manila spotted. He and other city officials said they had little idea what the term meant, let alone how big, or fatal, it could prove. "What was going through my head was the winds and flying debris and the rain," Mr. Lim said later.

Hundreds of officials—including the mayor's glamorous wife Cristina "Kring-Kring" Gonzales-Romualdez, a city councilor and former movie star--knocked on doors around the city or appeared on radio and television to urge residents to seek shelter in an evacuation center.

But they didn't physically force people to leave. After all, it was a tough sell. Many residents said they wanted to guard their property. Others were skeptical of the danger: A tsunami alert and mass evacuation in August 2012 turned out to be a false alarm. A city employee who headed the evacuation effort said officials were reluctant to physically force people from their homes because of fears it could trigger violence.

"Our people told them, 'Which is it—your life or your property? If you don't evacuate, don't blame us,'" said the city employee, Salvador Estudillo.

In all, about 15,300 people out of the city's more than 220,000 residents left their houses for city shelters. Maps and a whiteboard set up in a makeshift command center in City Hall recorded the progress. Many vulnerable residents remained to face the storm at home.

On Thursday morning, with Typhoon Haiyan's arrival predicted about 24 hours later, Mr. Romualdez, the mayor, reiterated the public message that this was no ordinary storm. A tall man with an affable face and an avid jet-skier, diver and boat captain, he prides himself on being hands-on in his duties and direct in speech. Gesturing at a screen showing the storm, he emphasized during a meeting with city staffers that the storm surge could reach as high as five meters. He said in a later interview that he made up the number in the hope it would scare people into action.

Even then, the warning wasn't widely heeded, in part because the term "surge" was unfamiliar even to those who have lived for years with fierce storms. "If they'd termed it a tsunami, I would have been very afraid," said Evelyn Cordero, acting head of the Government Services Office, which helps procure city supplies. "When they said 'storm surge,' it didn't really click in my mind."

The difference between the two is one of origin, not scale. The Philippine state forecasting agency, which officials in Manila and Tacloban were relying on for news of Haiyan, uses "storm surge" to describe giant waves caused by changes in atmospheric pressure and high winds during tropical storms. A tsunami, in contrast, is triggered by earthquakes.

By noon Thursday, many city employees were heading home to secure their families and stock up on supplies. Those who stayed behind at City Hall put the finishing touches on the city's defensive plan.

They covered computers in plastic sheeting and moved desks away from windows. Three million pesos in cash, or about $68,000, was laid aside to prepare for the purchase of relief supplies after the storm. Around 10 portable generators and 800 five-gallon jugs of water were readied, officials said.

The U.S. government recommends an average of one gallon of water be reserved per person per day for post-disaster scenarios. By that standard, the city's portable water supply would sustain only some 4,000 people, less than 2% of the city's population, for 24 hours.

Officials didn't contemplate requesting additional police protection to augment the city's force of close to 300 officers. Neither the police chief nor the mayor deemed it necessary, both said later. "We weren't expecting the typhoon to be that bad," said Domingo Cabillan, the police chief at the time.

Back in Manila on Thursday, President Aquino appeared on television with his own address. He warned that storm surges of as high as six meters were possible. He advised people to evacuate low-lying areas. "Let me repeat myself: this is a very real danger," he said.

He dispatched Manuel "Mar" Roxas II, the country's 56-year-old Interior Secretary, to Tacloban to check on preparations. Tall, with graying hair, Mr. Roxas is the Wharton-educated grandson of a former Philippine president and a close aide of President Aquino. He was accompanied by the country's defense secretary.

Mr. Roxas and his team arrived at the Tacloban airport on Thursday afternoon. In the airport VIP lounge, they met local government officials, including the mayor, Mr. Romualdez. The Romualdez family and the Aquinos have a history of bitter rivalry. Former first lady Imelda Marcos is the mayor's aunt, and hails from Tacloban. The Aquinos helped topple her husband, Ferdinand, in the so-called "People Power" revolt in 1986.

At the meeting, however, the focus was on the impending storm. Among other measures, Mr. Roxas advised local officials to batten and weigh down the metal sheet roofs of the city's schools. Teams of workers headed out around the city with blue nylon ropes, three-quarters of an inch in diameter.

As he toured the city, Mr. Roxas seemed satisfied with what he saw. He wrote on Twitter that it seemed like the situation was in hand.

"Crossing fingers," he wrote. "God bless everyone."

* * * * *

In a low-lying community called Fisherman Village, southeast of downtown Tacloban, Julius and Angie Tacugue were becoming increasingly anxious as word spread of a new, especially bad storm. The Tacugues didn't have their own television set, but repeatedly crossed the basketball court outside their one-room house to watch at a friend's home.

Mr. Tacugue, a bony man with intense, dark eyes grew up in Fisherman Village. Three years ago, after a few years away, he and Mrs. Tacugue, a petite, frenetic woman, moved back to the city with their two girls, Angeline, 8, and Angela, 5. In April 2012, the couple had a boy, Angelo, who Mrs. Tacugue nicknamed "guapo"–handsome in Spanish. The Philippines is a former Spanish colony.

Mr. Tacugue, 37, earned his living as a carpenter; Mrs. Tacugue, 33, sometimes sold banana sweets in the local market. The family lived on the backside of Fisherman Village, a spit of land. On one side was the bay, on the other—almost a kilometer away—was the ocean. The spit runs between Tacloban's airport and Patio Victoria, a popular seaside resort managed by staff of Mr. Romualdez, the mayor. Next door to the resort, the mayor had recently put finishing touches on his mansion.

The Tacugues were no strangers to powerful typhoons. Typhoon Son-Tinh, which struck in October 2012, knocked a tree onto their single-room house; Mr. Tacugue completed the repairs just a few months ago.

What resonated from the news coverage this time was Haiyan's label as a "supertyphoon." They also heard the words "storm surge," but no one around them seemed to know what that might indicate, the couple said later.

They weighed their options. Mrs. Tacugue wanted to stay home. Her husband thought an evacuation center would be safer. In a compromise, they said they agreed Mr. Tacugue would stay home to guard their food and other basic possessions. The others would go to the nearby Fisherman Village Elementary School, which the girls attended. Mrs. Tacugue packed a change of clothes for the children.

The school is a strip of single-story classrooms with corrugated steel roofs. It had sheltered locals in past storms. But this time the community's top official declared it unsafe. Emilita S. Montalban, the 48-year-old chairman of the neighborhood council, lived in a stone house just steps away. For more than a day, she had been advising neighbors to head to the Astrodome, about 4.5 kilometers (2.8 miles) around Cancabato Bay. She and her own family decamped to a hotel in the city.

On Thursday around 7 p.m., with Haiyan another 10 hours or so away, Ms. Montalban returned to the neighborhood to warn that the building wasn't fit for the severity of what was coming. For a start, it wasn't on elevated land, she told neighbors.

Mrs. Tacugue and others heard her warnings. But as night fell with the sky clear and stars visible, they played down the risks. The school was near a sheltered bay. The Pacific seemed too far away to be trouble.

Mrs. Tacugue also said she wasn't sure how to make the trip to the Astrodome, even if she decided to go. The city's streets were already thinning out as residents scurried inside.

At 10 p.m., the first rains from Typhoon Haiyan were starting to come down. The Tacugues took Angeline, Angela, and Angelo, dressed in a diaper and white tank top, to the school, a short walk away. The family settled in the Grade 3 classroom, where President Aquino's portrait hung on the wall. There were about 20 children inside, said Mrs. Tacugue. Down the hall was a classroom mostly filled with older people. In all, about 300 people crammed into the building, hunkered down for the storm to pass.

* * * * *

Typhoon Haiyan hit with full force in the early hours of Friday, Nov. 8. Some residents described it as sounding like a jet engine, others a loud scream. Within minutes, the floods that came with it decimated almost every aspect of the city's defenses, rendering futile almost a week of preparations.

As Mr. Roxas, the interior secretary, was having a final meeting to discuss storm measures from his team's temporary residence at the hilltop Leyte Park Resort Hotel, the windows blew in. They rushed to the stairwell for safety. At the same time, their communications links collapsed, cutting off the Philippines's most senior disaster-response official from Manila and the rest of the country. Mr. Roxas hadn't brought a satellite phone—an oversight he later said he regretted.

At City Hall, a skeleton crew had stayed the night, the better to respond to the storm when it arrived. As the winds grew stronger and windows began to shatter, they fled their offices to cower in the kitchen near the mayor's office, some wearing motorcycle helmets, many bent in silent prayer. Others wept, said staffers present at the time.

In a nearby city office, part of the roof blew off. The employees there scrambled downstairs to a storeroom in the basement and shut the door, said Liliosa Baltazar, one of the workers. When they saw water filling the basement, two men smashed windows in search of an escape. But outside, there was bedlam. Debris—chunks of concrete, sheet metal and felled trees—was flying in the howling wind and rain. They pushed up to the second floor of the office and waited.

Across town at the Astrodome, the city's main evacuation center where some 8,000 residents were sheltered, the storm detached a section of the roof and it flew away. Windows rimming the ceiling shattered. Evacuees shrieked and ran downstairs to offices a floor below, only to flee back upstairs and into the highest bleachers when water began pouring in, officials said. Many covered their heads in blankets to protect against falling rubble.

Near Fisherman Village, Mr. Romualdez, the mayor, was pacing around the grounds of his new home, which had been completed just days before. He, too, had opted not to seek shelter on higher ground or at an evacuation center. He said later it was because he wanted to keep tabs on what was happening on the ground. As the storm shrieked around him, he said he decided to see what was happening to the ocean. He crossed through the resort next door. Soon, he was engulfed as the Pacific waters poured in.

In a toilet connected to the resort's banquet room, he and aides stood on a table and punched a hole through the ceiling. Climbing on each other's shoulders, they made it out. They stood on the resort's roof in the howling winds, trying to make out traces of the airport, their neighbors' homes and nearby Fisherman Village. They saw only water.

It was his first realization, the mayor said later, that the storm was far beyond anything the city could hope to handle on its own.

His wife and daughters waited at another family house. When part of its roof flew off, they fled to her Toyota Innova outside, accompanied by their nanny, and slammed the door shut. The water began to rise. They said they panicked and exited as the waters engulfed the space around them, floating upwards until all they could do was grasp the remaining shreds of a nearby roof and grip them until the waters receded. Their six cars were bobbing about them—a soup of Toyotas, a Chrysler, a Ford four-wheeler and a black Chevrolet.

Water rose quickly in the Tacugues' home, too, and started ripping it apart. Mr. Tacugue said he fled for the school, where his wife, two daughters and 18-month son had moved for safety. By the time he took the few steps to the local basketball court, the water was just below his knees. By the time he reached the far side of the court, it was at his neck. The surge carried him to tree height and began to push him toward the bay.

He grabbed for the only thing around: the power line. He said later he figured it was safe because electricity had gone out hours earlier.

At the Fisherman Village Elementary School, the dark water rushed in so fast that it pressed some people to the ceiling and flung others out into the courtyard.

Holding her three children as best she could, Mrs. Tacugue was gurgling water. At eye level, she saw the school's curved red roof on the opposite side of the courtyard. Though she grew up on an island, Mrs. Tacugue never learned to swim. She has asthma and a fear of water.

As she was losing control in the swirling water, a neighbor, Erwin Golong, appeared beside her. "Help my children but not me," she said she yelled. Mr. Golong grabbed the girls and put them on the red roof of the school.

But in the maelstrom, Angelo disappeared.

Within seconds, the waters receded.

Mr. Tacugue let go of the line and sank back to the ground, the rain thrashing around him. Mrs. Tacugue searched frantically for Angelo. Mr. Tacugue arrived and hugged his wife and daughters tightly. Then he joined the search, among the throngs who poured out of the school looking for people who had been dragged away in the surf. Along a concrete break-wall, some 50 meters from the school, Mr. Tacugue saw one of his friends holding a baby. It was the lifeless body of Angelo.

Just finding the body provided Mrs. Tacugue with some comfort amid the chaos. "With all the people missing, thank God I found my boy," she said. Of the roughly 300 who sought shelter in the school, at least 23 died, according to a resident who later handled body bags.

* * * * *

By 10 a.m. Friday, the worst of Typhoon Haiyan had moved on, carrying much of Tacloban with it. At the Leyte Park Resort Hotel, Mr. Roxas and his small team of government officials gingerly found their way outside and stood, stunned.

The storm surge, two stories high, had ripped across the flat, sea-level peninsula on which Tacloban is built. Bodies lay dead in the streets. Thick trees had been ripped from the soil and slammed across the roads. Cars were upended and thrown into fields. Whole neighborhoods of wooden homes had been reduced to a wet, fetid pulp. Large ships had been thrown ashore. The surrounding hills of coconut trees were stripped nearly bare.

The officials walked past City Hall, which sits at the top of a hill overlooking the bay. Its windows were knocked out and there was no sign of life. There was no electricity or phone connection. They made their way to a nearby police station.

On the road about 4 p.m., some 10 hours after the storm hit, Mr. Roxas ran into Mr. Romualdez, the mayor, dressed in red coveralls as he and his family picked their way into the city on foot. "We got hit, but we're okay," the mayor said.

Across town, members of the mayor's staff were trying to clear some passage through the bedlam. They pushed aside beams of metal and fallen trees with their hands, trailed by a truck. They aimed to reach the airport in the hopes of establishing a connection to the outside world.

The eerie silence from Tacloban caused alarm in Manila. President Aquino dispatched a detachment of soldiers from their base near Catbalogan City, about 100 kilometers by road to the north, in large part by foot to make contact with Mr. Roxas and others.

Going by foot was considered to be the only option: The roads were impassable, trees were down and officials didn't know where or if they'd be able to land helicopters in Tacloban.

Twenty hours later, on Saturday afternoon, the soldiers arrived at Tacloban's police station where Mr. Roxas and his team had made camp. The soldiers handed him a satellite phone. Roughly 24 hours after Haiyan's landfall, he could finally reach Manila.

A few hours later, the first Philippine Air Force C-130 transport plane landed at Tacloban airport.

Mr. Romualdez, the mayor, helped direct some clearing operations that day. Still, he said, his thoughts were on his family—his wife and two daughters. Whenever they walked around town, he said, he told his daughters to hold onto him and not to look at the dead bodies.

There was no one to clean them up or search for survivors. The city's employees were scattered, unable to turn up to work, and unreachable. Only about 10% of the city's 293-strong police force appeared for duty.

"I knew some of the people in the rubble were still alive, but we were helpless to get them out," Mr. Romualdez said.

Mr. Romualdez said he asked the president to bring in more people from the national government and the armed forces to help the shattered city regain its footing. But their discussion soon got bogged down over protocol.

City officials, including Mr. Lim, say that President Aquino suggested in turn that the city council pass a motion endorsing that proposal—something that was impossible given that many council members were dispersed around town and not in contact. Mr. Aquino's spokesmen said they had no information about the conversation.

The next day, Nov. 11, the Aquino administration declared a state of calamity to address the problem and free up more resources to join the relief effort.

Desperate residents took the law into their own hands. They broke into grocery stores, drugstores and shopping malls. In Fisherman Village, which was flattened, residents made for three giant warehouses that had been ripped open by the storm: a rice miller; a cigarette trader; and a company with stockpiles of dried commodities, from canned pineapple to candy, participants said.

They helped themselves to milk powder, Chinese noodles and peanuts. Then they started stripping machines and anything else of value. Among the debris were multiple sets of playing cards. On the back they read: "Today Is My Lucky Day."

Mr. Tacugue lost count how many trips he made to carry heavy bags of rice to his wife and two daughters. He said he grabbed noodles, soap, and sardines, too. The girls got candy, enough to last them weeks. Widespread looting took place elsewhere in the city. Residents say they heard shots being fired and saw people carrying everything from appliances to books to furniture.

Later on Saturday, President Aquino laid down his assessment of the stricken city during a media briefing at the National Disaster Risk Reduction and Management Council in Manila. Of Tacloban, he said "I hate to say it, but it seems it was not very prepared compared with other areas."

* * * * *

O ver the next week, bodies lay decaying beside the streets for days, as officials decided to put what meager resources they had into clearing the streets. Hundreds of corpses were put into mass graves.

Local authorities and aid workers said at least eight people were crushed to death when a crowd looting rice from a government warehouse in the nearby town of Alangalang caused a wall of rice sacks to collapse.

But aid deliveries picked up to Tacloban, helped by the U.S. military and others. Hundreds of additional soldiers and policemen arrived.

In assessing the damage and the city's response, the leaders responsible for managing the disaster in Tacloban said they simply didn't foresee the scale of the storm and its impact, even though the government's own forecasters and President Aquino had predicted storm surges six meters high.

"I think there was just no way to imagine, no way to calculate the destructive force of Yolanda," said Mr. Roxas, the interior secretary.

He added: "One of the problems was the term 'storm surge.' Nobody had heard it before, nobody knew what it was. I know it's the specific term the meteorologists use, but perhaps we should have said 'tsunami.' At least people would have been more aware of the danger."

Mr. Romualdez, the mayor, said he did everything he could. If he had to do it over again, he said, he wouldn't underestimate the storm.

President Aquino has called for an investigation into why so many people died from the typhoon. The toll of more than 5,000 is twice the high end of the estimate that the president predicted when he spoke on CNN four days after the storm, when he said the total would be closer to 2,000 or 2,500.

Two weeks after Typhoon Haiyan flattened Tacloban, Mrs. Tacugue picked her steps carefully as she walked around the garbage-strewn Fisherman Village Elementary School. She was making her first visit to the muddy and smelly school grounds since the day her son was swept away.

Holding a red-and-white plastic bag, she scavenged a few items of clothing from the tangled ruins for her daughters and then headed back to a lean-to that her husband had fashioned for their shelter. It was secured by a big stone and the frame of a pedicab missing its wheels. He topped it with steel sheeting and plastic. Inside were the family's few assets: a pot, slippers and large bags of rice. They sleep on concrete.

Mrs. Tacugue also salvaged a big golden teddy bear from the ocean of debris that surrounds them. One afternoon, she set it on a small blue chair for her daughters to play with. "He's their brother," Mrs. Tacugue said. Angelina, the older girl, tried to stretch her arms across its torso.

Mrs. Tacugue said she cries for Angelo at night. "I feel he's with me," she said. "But it quickly fades." She lost her only photograph of him in the storm.

—Josephine Cuneta and Cris Larano contributed to this article.

Write to Te-Ping Chen at te-ping.chen@wsj.com, James T. Areddy at james.areddy@wsj.com and James Hookway at james.hookway@wsj.com