Updated

A Russian court on Monday reduced the three-year prison sentence of a South Carolina pastor convicted of smuggling rifle ammunition and ordered him set free.

The Moscow City Court reduced Phillip Miles' sentence to 10 months and ruled that he should be freed from custody without serving all of it. Miles, who has been in jail since Feb. 3, will likely be released Tuesday, his lawyer said, and is expected to leave Russia by next week.

Miles, who listened to the decision from jail via videolink, spread his arms wide and said "Hallelujah!" as the translator explained the ruling.

"We're glad that justice was done today," said Dominic Starr, Miles' American attorney and a member of his church.

The ordeal has been tough on Miles' wife and four children, who are "elated and relieved and anxiously awaiting his return," according to Starr. "They miss their dad," he told FOXNews.com. "They'll be happy to get him back."

A pastor at the Christ Community Church in Conway, S.C., Miles was convicted in April after security officers at a Moscow airport found a box of .300-caliber cartridges in his luggage.

He repeatedly apologized, saying that the ammunition was for a Russian friend who had recently bought a Winchester rifle and that he did not know bringing such ammunition into the country was illegal.

Russian defense lawyer Vladimir Ryakhovsky argued that the English-language customs signs at Moscow's Sheremetyevo airport were confusing and made no mention of ammunition.

The lower Golovinsky District Court judge rejected the lawyer's arguments and Miles' apologies, saying she could not condone ignorance of Russian customs regulations and noted Miles had visited the country more than 10 times.

Ryakhovsky on Monday cast Miles as a victim of a culture gap.

"He could be the victim of American mentality, presuming that things allowed in the United States are the same everywhere," he said.

Before the ruling was issued, Miles spoke to the three-judge panel, looking tired in a gray jacket and his pastor's collar. A court-provided translator struggled to convey his comments and often lost significant parts of it.

A crowd of inmates could be seen in the jail cage surrounding him, waiting wearily for their own proceedings to get under way.

"Please don't destroy my life over one box of hunting bullets," Miles pleaded.

"I have been in prison for five months because of my ignorance of the customs laws," he said. "I would ask the court to let this be sufficient punishment for my ignorance."

Miles does not speak Russian — “just a few words,” according to Starr. "I know he's looking forward to being back among people who speak English. I think he was really starting to feel isolated."

U.S. embassy officials in Moscow have visited Miles regularly during his confinement, and have been relaying messages and letters from home to the imprisoned pastor. A consular officer was present at Miles’ trial and sentencing, according to a State Department official.

Despite the initial sentence, Starr said that Miles has kept his faith and confidence throughout the process. “Pastor Miles has a very strong faith in God and I’m sure that he believes that what’s happening to him is part of God’s plan for him, and that he’ll accept whatever will happen to him,” he said.

Back home in South Carolina, that’s also been the case. Attendance at the church Miles founded 26 years ago has been very strong in his absence, according to Starr.

"The church has done extremely well," he said. "It made people really get more unified, it's made the church stronger — I'm confident of that. I think Pastor Miles is going to be very pleasantly surprised when he sees what our church looks like when he gets back."

Marlene Graber, the music and arts director at Miles' church, said the ruling was welcome news.

"We are thrilled. We are just really excited that the judge has decided to overturn the ruling and free him and we are really happy he is on his way home," she said.

Miles' case had drawn the support of dozens of U.S. senators and representatives, who complained that the sentence was too harsh. Ryakhovsky also reminded the court of a letter by Russia's presidential human rights ombudsman, Vladimir Lukin, who also asked for clemency.

Ryakhovsky said after the verdict that the judges might have been encouraged by the new President Dmitry Medvedev's call for stronger independence of courts. Medvedev has pledged to give more freedom to businesses, civil society, media and courts which have suffered from heavy interference by authorities.

The statements raised hopes that Medvedev could soften some of the most repressive policies of his predecessor and mentor, Vladimir Putin.

The Associated Press contributed to this report.