The Alan Pulido kidnapping took another dramatic turn Tuesday, with authorities announcing that the alleged mastermind was arrested after a shootout with police -- and that the suspect is part of Pulido's extended family.

The suspect, Osvaldo Velazquez, was wounded but expected to live after firing at police, according to Ismael Quintanilla, the attorney general of the northern state of Tamaulipas. Velazquez is married to a cousin of Pulido and accused of belonging to a local criminal gang.

Pulido, a Mexican star who plays for Olympiakos in the Greek league, was kidnapped after leaving a party near Ciudad Victoria last week and escaped after overpowering one of his captors and calling for help. That man, Daniel Morales, tipped police off to the location of Velazquez.

More from FoxSports

Alan Pulido's cousin's husband has been arrested for allegedly masterminding his kidnapping.

— Duncan Tucker (@DuncanTucker) May 31, 2016

Pulido's cousin's husband is accused of belonging to a local criminal gang dedicated to drug trafficking, kidnapping and extortion.

— Duncan Tucker (@DuncanTucker) May 31, 2016

The suspect reportedly fired at federal police officers as they tried to arrest him, and was wounded in the process.

— Duncan Tucker (@DuncanTucker) May 31, 2016

About 24 hours after he was kidnapped, Pulido found himself alone with one of his captors and saw his chance. He wrestled away the man's pistol and his mobile phone and dialed Mexico's emergency number. Within minutes, he was free.

An official summary report of three calls to an emergency operator obtained by The Associated Press shows that the 25-year-old forward threatened and beat his captor while on the phone, demanding to be told where they were.

The dramatic account shows that Pulido was his own savior, in contrast to initial official accounts of his rescue by police.

On a first call, with the kidnapper overpowered, Pulido peered out of a window and described the white two-story house with two cars, grey and red, parked in front.

In the next call, Pulido told the operator that state police had arrived outside. The operator told him to fire the pistol so they would know they were in the right spot, but Pulido said he had no bullets. He said police themselves were starting to shoot and described his shorts and tank top so they wouldn't confuse him with the now-unconscious captor.

Once police arrived, he made a third call to confirm with the operator that they were trustworthy.

Pulido was nabbed by four armed people on a highway while returning from a party at about 11:30 p.m. Saturday. His girlfriend, who was not taken, alerted others.

"Everyone began to activate to look for him, especially when we knew who he was, because we knew it was going to make a big ruckus and was going to be affecting us a lot in the press," Quintanilla said.

Quintanilla said the army, federal and state police participated, including three helicopters.

Pulido's family received the first ransom call around 1:30 p.m. on Sunday and a second one a short time later, Quintanilla said. The kidnappers had demanded $325,000 (6 million pesos).

After he was freed, Pulido was taken for medical and psychological tests and then provided a statement to investigators.

He made a brief appearance before reporters, responding only to a question about how he was: "Very well, thank God."

The kidnapping happened one week before scheduled elections for a new governor. Tamaulipas, which borders Texas, has been plagued with violence in recent years.

According to government statistics, there were 41 reported kidnappings in Tamaulipas in the first four months of this year compared to 78 during the same period last year. The actual number is believed to be much higher since most people do not report kidnappings to authorities.

Also from January to April 2016, there were 179 murders in the state, compared to 211 during the same period last year.

Mexico saw another soccer-related kidnapping in 2005, when Cruz Azul's Argentine coach Ruben Omar Romano was abducted in Mexico City. He was captive 65 days before being freed by federal police.

AP Deportes and Sky Sports contributed to this report.