First, a 7.1 magnitude earthquake rocked Mexico, killing hundreds. Then, a day later, a category 4 hurricane pummeled Puerto Rico, leaving millions of people without power and with little water.

Two major calamities, one sterling response: Staffers of The Associated Press went to heroic lengths to tell the world the stories of two places battered by disaster. Their efforts were led to extraordinary achievements – in text, photos and video – and the Beat of the Week.

When the quake hit, staffers in Mexico City began reporting the story immediately, even as their ninth-floor offices continued to shake. They sent alerts and urgents, live pictures from local channels and a video edit well ahead of competitors. (In the first 12 hours, the AP moved 10 video edits and carried multiple live shots.) Most dramatically, Alexis Triboulard calmly filmed the shaking in the bureau.

The Mexico City bureau made the tough call of sending a team to the quake epicenter ahead of other agencies.

The bureau then made the tough call of sending a team to the quake epicenter. Though the most dramatic wreckage was in the capital itself, it calculated that clients would want visuals of the hard hit state of Morelos and sent a team to Jojutla ahead of other agencies. AP photos of destroyed churches and homes there were seen globally. An AP intern manned the video live shot, as other staffers focused on capturing wreckage and rescue efforts. Drones, a helicopter and even 360 video were employed to tell the story of the earthquake’s aftermath.

Text reporters looked closely at the human toll of the quake, with stories on families living out on the street and another on young Mexicans helping their community clear the rubble.

As the hurricane damage in Puerto Rico became apparent, the Mexico team and particularly the photo desk redoubled their efforts. They continued working on quake photos while also editing the pictures coming in from the Caribbean, collecting user-generated content for both – and finding a new place to live for photo editor Anita Baca, whose apartment building was rendered uninhabitable. They also were mourning their friend Elizabeth Esguerra Rosas, wife of prominent Mexico City photojournalist Wesley Bocxe. Both were buried in a collapsed building, but only Bocxe survived.

Coto knew she needed to stay connected throughout a storm that would test Puerto Rico’s electric grid. She set up in a hotel with generators and buried infrastructure.

Puerto Rico, meanwhile, was in the throes of its own humanitarian disaster.

The staff in San Juan had been going flat out for a month without a day off as massive storms pounded the Caribbean. But when Hurricane Maria loomed, newswoman Danica Coto knew she needed to find a way to stay connected throughout a storm that would test the island’s electric grid. She set up shop in a hotel that had generators and buried internet infrastructure.

Her planning paid off; she was able to file text, photos and video after Puerto Rico was blacked out by Maria’s 155 mph winds.

Other members of the AP team assembled to tell the story of the suddenly cut-off U.S. territory of 3.4 million people. Carlos Giusti, a photo and video freelancer, traveled to the area in southern Puerto Rico that was expected to be hit hardest, and it was: His car was crushed by a tree and an airborne tin roof. Chris Gillette, one of AP's most seasoned video producers, was off the island but managed to book a seat on one of the only flights into Puerto Rico after the storm, beating dozens of other news organizations.

Giusti captured dramatic images of the damage in southeastern Puerto Rico; Gillette got a video crew out to the area where a compromised dam threatened to flood 70,000 people.

A week after the hurricane, Coto still was living in the hotel and doing her laundry in the bathtub as she filed – her home had no power. She put a human face on the devastation with the heart-rending description of a girl laying out buckets on her grandmother's roof to collect rainwater; with an all-format a story on desperate Puerto Ricans trying to reach family in the mainland; with a portrait of an island that has endured a decade-long economic downward spiral, now pushed to the edge.

"I don't know if I can keep going," said Rose Maria Almonte, a 73-year-old cafe owner, after mopping up water that seeped into her shop. The shop’s awning sat in a heap on her counter. "What am I doing here?"

For their dedication in the face of adversity – dedication that paid off with astonishing coverage of two major disasters in all formats – the Mexico City and San Juan bureaus share this week’s $500 prize.