Mexico is willing to extradite drug lord Joaquin "El Chapo" Guzman to the United States, a federal law enforcement official said Saturday. It's a sharp reversal from Mexico's official position after his last capture in 2014.

"Mexico is ready. There are plans to cooperate with the U.S.," said the official, who spoke on condition anonymity because he wasn't authorized to comment.

But the official cautioned that there could be a lengthy wait before U.S. prosecutors can get their hands on Guzman, the most-wanted trafficker who was recaptured Friday after six months on the run: "You have to go through the judicial process, and the defense has its elements too."

Mexico's leaders had previously avoided talk about extradition following Guzman's capture early Friday.

Joaquin "El Chapo" Guzman, a legendary figure in Mexico who went from being a farmer's son to the world's top drug lord, was apprehended Friday after a shootout between gunmen and Mexican marines at a house in Los Mochis, a seaside city in Guzman's home state of Sinaloa.

Authorities were able to track him to a house in an upscale neighborhood in the coastal city in part because of Guzman's moves to film a biopic of his life, Mexico Attorney General Arely Gomez said late Friday at the airport ceremony where the prisoner was shown off to the press.

"For that he established communication with actresses and producers, which became a new line of investigation," she said.

Guzman was presented late Friday in dark blue athletic clothing. He was frog-marched to a helicopter by marines, who stopped midtransit and turned his expressionless face toward the media for a clear view.

For now, they have sent him back to the Altiplano maximum-security prison from which he escaped in July under the noses of guards and prison officials at Mexico's most secure lockup. Guzman slipped out through an elaborate tunnel that showed the country's depth of corruption while thoroughly embarrassing the administration of President Enrique Peña Nieto.

After Guzman's capture in 2014, Mexico's government insisted it could handle the man who had already broken out of one maximum-security prison, saying he must pay his debt to Mexican society first.

In celebrating Guzman's latest capture, Mexican officials showed none of their bravado of two years ago, though they made clear that the intelligence-building and investigation were carried out entirely by Mexican forces.

"They have to extradite him," said Alejandro Hope, a security analyst in Mexico. "It's almost a forced move."

Friday's operation resulted from six months of investigation and intelligence-gathering by Mexican forces, who located Guzman in Durango state in October but decided not to shoot because he was with two women and a child, she said. After that he took a lower profile and limited his communication until he decided to move to Los Mochis in December.

Attorney General Gomez said that one of Guzman's key tunnel builders led them to the neighborhood in Los Mochis, where authorities did surveillance for a month. The team noticed a lot of activity at the house Wednesday and the arrival of a car early Thursday morning. Authorities were able to determine that Guzman was inside the house, she said.

The marines decided to close in early Friday and were met with gunfire. Five suspects were killed and six others arrested. One marine was injured.

"You could hear intense gunfire and a helicopter; it was fierce," said a neighbor, adding that the battle raged for three hours, starting at 4 a.m. She refused to be quoted by name in fear for her own safety.

Gomez said Guzman and his security chief, "El Cholo" Ivan Gastelum, were able to flee the scene via storm drains and escape through a manhole cover to the street, where they commandeered getaway cars. Marines climbed into the drains in pursuit. They closed in on the two men based on reports of stolen vehicles, and they were arrested on the highway.

The troops took them to the roadside hotel Doux, where they awaited reinforcements, Gomez said.

"The arrest of today is very important for the government of Mexico. It shows that the public can have confidence in its institutions," Peña Nieto said later in a public address. "Mexicans can count on a government decided and determined to build a better country."

What happens now is more crucial for Guzman, whose cartel smuggles multi-ton shipments of cocaine and marijuana as well as manufactures and transports methamphetamines and heroin, mostly to the U.S.

The United States filed requests for Guzman's extradition last June 25, just days before he escaped from prison. In September, a judge issued a second provisional arrest warrant on U.S. charges of organized crime, money laundering, drug trafficking and homicide, among others. But Guzman's lawyers already had filed appeals and received injunctions that could delay the extradition process for months or even years.

"The arrest is a significant achievement in our shared fight against transnational organized crime, violence, and drug trafficking," the Drug Enforcement Administration said in a statement.

The Associated Press