NOGALES, MEXICO (CBS/AP) -- A U.S. woman jailed in Mexico on a drug-smuggling charge was released late Thursday night after court officials reviewed her case.

Yanira Maldonado was greeted by well-wishers as she walked out of the jail and hugged her husband, Gary, as officials closed the jail doors behind her.

Maldonado was arrested by members of the Mexican military last week after, they said, they found nearly 12 pounds of pot under her seat on the commercial bus traveling from Mexico to Arizona.

Her release came hours after court officials reviewed security footage that showed her and her husband boarding a bus in Mexico with only blankets, bottles of water and her purse in hand.

She briefly spoke to reporters gathered outside the jail, saying she thanks God, her husband and her lawyer.

With that, she walked hand-in-hand with her husband to a waiting car and departed.

Gary Maldonado said earlier Thursday he was confident the video would exonerate his wife in the nightmare scenario that has prompted outrage in the U.S. among politicians and pitted the conservative Mormon family against a judicial system that has long struggled with corruption.

Gary Maldonado was arrested by the Mexican military last week after they found nearly 12 pounds of pot under his wife's bus seat on a commercial bus traveling from Mexico to Phoenix. After Yanira Maldonado begged the soldiers to allow her to come along to serve as her husband's translator, the military officials decided to release him and arrest her instead, he said.

The family's lawyer in Nogales, Jose Francisco Benitez Paz, had told reporters earlier he was "100 percent" confident Yanira Maldonado would be freed once a judge reviewed the video from the bus company.

He noted that it was a fairly sophisticated smuggling effort that included packets of drugs attached to the seat bottoms with metal hooks -- a task that would have been impossible for a passenger like Maldonado.

"All the evidence they have is the drug under the seat," he said.

The Maldonados were traveling home to the Phoenix suburb of Goodyear after attending her aunt's funeral in the city of Los Mochis when they were arrested.

Gary Maldonado said authorities originally demanded $5,000 for her release, but the bribe fell through. When the couple tried to defend themselves, military officials told them the court would sort it out, Gary Maldonado said.

The couple took the bus because they thought it would be safer than driving. They had taken a similar bus during a separate trip in Mexico.

"We never thought this would ever happen," said Gary Maldonado, who doesn't speak Spanish and couldn't understand the court proceedings involving his wife.

Drug traffickers have increasingly been using passenger buses to move U.S.-bound drugs through Mexico.

In a notorious case, federal police in 2011 found half a ton of marijuana hidden under the seats of a bus headed to Piedras Negras, across the border from Eagle Pass, Texas. They arrested the driver and two other people.

Federal agents and soldiers have set up checkpoints throughout Mexico's main highways and have routinely seized cocaine, marijuana, heroin and other illegal drugs from buses.

When drug suspects are arrested in Mexico, they face a murky situation. Mexico's justice system is carried out largely in secret, with proceedings done almost entirely in writing.

Four years ago, Mexico decriminalized the possession of small amounts of marijuana, cocaine and heroin, but it still has stiff penalties for drug trafficking.

Mexican law doesn't specify a minimum or maximum sentence in drug crimes and leaves it up to the judge to decide how long the sentence should be, said Jose Luis Manjarrez, a spokesman for federal prosecutors in Mexico.

The bus passed through at least two checkpoints on the way to the border without incident. In the town of Querobabi in the border state of Sonora, all the passengers were ordered off the bus and a soldier searched the interior as they waited. The soldier exited and told his superiors that packets of drugs had been found under seat 39, Yanira Maldonado's, and another seat, number 42. Her husband was in seat 40.

Gary Maldonado said a man sitting behind them on the bus fled during the inspection. He believes the man might have been the true owner of the drugs.

Mexican officials provided local media with photos that they said were of the packages Maldonado is accused of smuggling. Each was about 5 inches high and 20 inches wide, roughly the width of a bus seat. The marijuana was packed into plastic bags and wrapped in tan packing tape.

Earlier this week, Benitez presented testimony from Yanira Maldonado and from two relatives who accompanied the couple to the Los Mochis bus station, and two fellow passengers on the bus. All four testified that she had not been carrying any drugs.

He described her as depressed while in jail, but she had not been abused or mistreated.

"She doesn't accept any of the accusations that are being made," he said earlier. "She is sad because of the situation, in which she's being accused of a crime she didn't commit."

On Wednesday, an army lieutenant, a private and another sergeant were supposed to appear in court but did not show up. The army did not explain why, Benitez said.

The lawyer said he had requested a list of the bus passengers and video of the passengers boarding in Los Mochis, and presented letters from people he described as prominent American officials vouching for Maldonado's character. He said he was awaiting financial information proving she would have no need to earn cash smuggling drugs.

A search of court records in Arizona didn't turn up any drug-related charges against Yanira or Gary Maldonado.

The Mexican Embassy in Washington said in a statement Tuesday that Yanira Maldonado's "rights to a defense counsel and due process are being observed." The embassy didn't respond to allegations she was framed.

The assistant judge in Mexico had to make a decision by Friday at 6 p.m., reports CBS Phoenix affiliate KPHO-TV. If Maldonado hadn't been released, she could have been transferred to a federal prison in southern Mexico for several months until her trial date.

Yanira Maldonado is a naturalized U.S. citizen who was born in Mexico, her family said. She and Gary Maldonado were married one year ago, and they celebrated their anniversary while she was jailed.

Jen Psaki, a U.S. State Department spokeswoman, said U.S. consulate officials in Mexico were closely monitoring the case. State Department officials visited her Friday.

"Private citizens who travel abroad are expected to, of course, abide by the law in the country where they are visiting, and the consular office is in touch when cases like this arise to be helpful in advising," Psaki said in a press briefing in Washington on Wednesday.

Online Public Information File

Viewers with disabilities can get assistance accessing this station's FCC Public Inspection File by contacting the station with the information listed below. Questions or concerns relating to the accessibility of the FCC's online public file system should be directed to the FCC at 888-225-5322, 888-835-5322 (TTY), or fccinfo@fcc.gov.