MEXICO CITY — Just before 7 a.m. on Saturday, dozens of soldiers and police officers descended on a condominium tower in Mazatlán, Mexico, a beach resort known as much as a hangout for drug traffickers as for its seafood and surf.

The forces were following yet another tip about the whereabouts of one of the world’s most wanted drug kingpins, Joaquín Guzmán Loera — known as El Chapo, which means “Shorty” — who had eluded such raids for 13 years since escaping from prison, by many accounts in a laundry cart. With an army of guards and lethally enforced loyalty, he reigned over a worldwide, multibillion-dollar drug empire that supplied much of the cocaine and marijuana to the United States despite a widespread, yearslong manhunt by American and Mexican forces.

This time, however, Mr. Guzmán, believed to be in his mid-50s, did not slip out a door, disappear into the famed mountains around his northwest Mexico home, or prove to be absent, as he had in so many previous attempts to apprehend him. He apparently had no time to reach for the arsenal of guns and grenades he had amassed or dash into a storm drain or tunnel, as authorities said he recently did minutes ahead of pursuers.

Mexican marines and the police, aided by information from the United States Drug Enforcement Administration, immigration and customs officials and the United States Marshals Service, took him into custody without firing a shot, according to Mexican officials.

Mexico’s attorney general, Jesús Murillo Karam, said a later forensic exam made it “100 percent” certain the man was Mr. Guzmán; the tests were done to avoid the kind of embarrassment Mexican officials faced in June 2012 when they announced the arrest of Mr. Guzmán’s son, only to later discover it was not him.

Mr. Guzmán faces a slew of drug trafficking and organized crime charges in the United States, which had offered $5 million for information leading to his arrest in the hopes of dealing a crippling blow to an organization that is the country’s top provider of illicit drugs.

Mr. Guzmán’s Sinaloa Cartel is considered the largest and most powerful trafficking organization in the world, with a reach as far as Europe and Asia, and has been a main combatant in a spasm of violence that has left tens of thousands dead in Mexico.

“Big strike,” said a Twitter posting by former President Felipe Calderón, who had made cracking down on drug gangs a hallmark of his tenure.

But it was the forces under the control of President Enrique Peña Nieto, whose resolve to fight drug traffickers was questioned, that produced the biggest arrest in a generation. While Mr. Peña Nieto has not allowed American law enforcement officials the kind of broad access in Mexico that Mr. Calderón had permitted, the two countries have continued to work together on big cases.

Image

Mr. Guzmán after his capture.

Eduardo Medina Mora, the Mexican ambassador to the United States, said that the two governments had been working together on the case for months. But whether Mr. Guzmán would be extradited to the United States has not been worked out.

“I think it’s important that first he faces the charges against him in Mexico,” the ambassador said.

It remains to be seen if the arrest will interrupt Mexico’s thriving drug trade. The capture or killing of a drug lord sometimes unleashes more violence as internal feuds break out and rivals attack. And given the efficiency of the Sinaloa Cartel, it is possible the group will manage a smooth transition to a new leader and continue with business as usual.

“The takedown of Chapo Guzmán is a thorn in the side of the Sinaloa Cartel, but not a dagger in its heart,” said George Grayson, a professor at the College of William and Mary who studies the drug war.

Over time, as he eluded capture, his legend and the mystery of his whereabouts grew. He had been rumored to be in Guatemala, Argentina, Bolivia, and even, as Mr. Calderón once speculated, in the United States, where his wife had given birth to twins.

But in the end, he was captured not long after doing what so many cartel bosses do: having a party in Mazatlán.

Few details were available on Saturday, but a picture of Mr. Guzmán, who appeared kneeling and handcuffed with a few cuts on his face and shoulders, circulated among law enforcement officials.

In the afternoon, he was paraded before the media at a news conference at Mexico City’s international airport, in dark jeans, a dress shirt and noticeably blacker hair than in previous photographs. Masked Mexican marines gripped him as he was walked to a helicopter that would take him to prison.

The authorities seized an arsenal during his arrest, suggesting the lengths he went to protect himself: 97 large guns, 36 handguns, 2 grenade launchers, a rocket launcher, and 43 vehicles, several of them armored.

Without specifying their location, Mr. Murillo Karam said Mr. Guzmán had seven houses, with reinforced steel doors and connected by tunnels that allowed him time to escape just ahead of the police.

Video

Joaquín Guzmán Loera, “El Chapo,” one of Mexico’s top drug bosses and a Forbes list billionaire since 2009, was captured today in a Mexican resort after a 13-year manhunt.CreditCreditPedro Valtierra/European Pressphoto Agency

An American law enforcement official said that last week, the D.E.A. assisted Mexican agents in a raid on an upper-class neighborhood of Culiacán, Mexico, the Sinaloa State capital, arrested several security people for Mr. Guzmán and discovered the tunnels, with openings to them in the showers of several homes.

Mr. Guzmán fled to Mazatlán, the official said, and the Mexicans and Americans followed.

As it became apparent that Mr. Guzmán had been caught, some in Mazatlán, where he had been known to dole out wads of cash to keep his whereabouts secret, expressed concern. At a breakfast gathering for local businessmen, a few attendees got up and left immediately, according to a witness.

“It’s bad news for Mazatlán,” said one of the men at the breakfast. “He was keeping the peace.”

In the years since he escaped prison, Mr. Guzmán took on near-mythic status. He landed on the Forbes list of the world’s richest people. He picked up the tab for entire restaurants, or so the stories go, to ensure diners would remain silent about his outings. According to a leaked diplomatic cable, he surrounded himself with an entourage of 300 armed men for protection. And narcocorridos, folk ballads in tribute to drug lords, were sung in his honor.

Although Mr. Guzmán had remained the head of the Sinaloa Cartel, security analysts have long suspected that much of the day-to-day management fell to subordinates still at large.

Mr. Guzmán was born in poverty in the foothills of the Sierra Madre in Sinaloa State and dropped out of school by third grade. His first foray into drug smuggling came in the late 1980s, when, the State Department said, he began working for Miguel Ángel Félix Gallardo, once Mexico’s biggest cocaine dealer, as an air logistics expert.

Mr. Guzmán exploited the cocaine boom in the United States at the time, making valuable contacts along the transportation chain from Colombia to Arizona.

By the time the Mexican authorities captured Mr. Félix Gallardo in 1989, Mr. Guzmán had begun forming his own cartel.

In 1993, he was charged in the United States with money laundering and racketeering, and three months later, he was arrested and convicted in Mexico on drug and homicide charges and sentenced to 20 years.

As American investigations continued, indictments piled up. One in 1994 said Mr. Guzmán continued operating his organization through a brother while jailed. Then, in January 2001, Mr. Guzmán’s criminal career took a stunning turn with his escape.

Some Mexicans greeted the news of his capture with a shrug as drug violence continues. There is also uncertainty over what to believe about Mr. Guzmán. “He was somebody who existed,” said Gustavo Colin in Mexico City, “and didn’t exist.”

Correction:Feb. 24, 2014

Because of an editing error, an article on Sunday about the capture of Joaquín Guzmán Loera, the world’s most-wanted drug kingpin, misidentified, in some copies, the location where he appeared to have been hiding in 2012. It was in the Mexican state of Baja California Sur, not Baja, Calif.