The US-based Center for Human Rights in Iran (CHRI) announced the news on Twitter, and Iran's state news agency Isna reported that Panahi was greeted by several supporters as he left the prison in Tehran.

On Thursday, Jafar Panahi began a hunger strike to protest that his hopes of being released on bail appeared to have been dashed by the country's judiciary, despite his sentence being overturned by Iran's Supreme Court.

The 62-year-old Panahi, who is one of Iran's most awarded filmmakers, was arrested last July and put in Tehran's notorious Evin prison to serve a six-year sentence for "propaganda against the system" - a sentence handed down back in 2010.

Panahi has also been banned from both leaving Iran and making films.

Despite that, he has continued with filmmaking and his latest film "No bears" was awarded the jury's special prize at the Venice Film Festival in September.

During the festival, a demonstration was also held in support of filmmakers imprisoned around the world.

"No bears" will have its Swedish premiere later in February.