After waiting for days to get one signature needed for the release of two U.S. hikers in Iran, lawyer Masoud Shafiei said he has finally succeeded in his mission on Wednesday.

Josh Fattal and Shane Bauer, recently sentenced to eight years on charges of spying and entering the country illegally, will be released within hours, Shafiei said.

Reuters reported that a convoy of Swiss Embassy cars entered Evin prison, where the men have been held, signaling that their release was imminent.

On Sunday, the much-awaited release was delayed as one of the judges was on leave and his signature was required on the bail papers for the release.

The court of appeal agreed to Branch 36 of Tehran with the release of two Americans, Iran's judiciary said in a statement.

I will be in front of Evin prison at 3 p.m., Shafiei said, explaining that he was not sure whether the Swiss ambassador to Iran, who represents the interests of the United States in Iran, would be there too. They will be free, that is what matters now.  

Last week, in an interview to NBC, President Mahmoud Ahmadinejad, said that he expected both the Americans to be released in a couple of days.

Last Tuesday, Iran's revolutionary court agreed to release Bauer and Fattal on $500,000 bail. Branch 36 of the revision court has consented to release these two American nationals on a bail of half a million dollars, said Shafiei.

But just a day later, the judiciary overruled Ahmadinejad, saying that he did not have authority to free the two Americans.

Bauer, Fattal and Sarah Shourd were arrested on July 31, 2009, on suspicion of spying. Shourd was released in September 2010 after she paid a bail of $500,000.

Bauer, Fattal and Shourd say they were hiking in the mountains of northern Iraq and, if they crossed the unmarked border into Iran, it was by mistake.

Bauer and Fattal were convicted at a trial held behind closed doors and share a cell in Tehran's Evin prison.

Their supporters said evidence against them had never been made public, and that the sentence came as a shock after hopes for their release had been boosted by positive comments from Iran's foreign minister.