Britain is set to formally reopen its embassy in Iran nearly four years after demonstrators ransacked the building, prompting its closure, the Guardian reported Thursday. Foreign Secretary Philip Hammond is expected to visit Tehran this weekend for the first time a British foreign secretary has visited Iran in 14 years.

Iran will also reopen its embassy in London as relations between the two countries ease following the seven-party deal reached in July over Iran's nuclear program. The agreement, if passed by both the U.S. and Iranian governments, will see Iran commit itself to a peaceful nuclear program in exchange for a gradual lifting of international sanctions.

The British Embassy in Tehran was closed after it was targeted by students and the Basij militia, a volunteer paramilitary organization, angry over continued international sanctions on their country. Then-Foreign Secretary William Hague told Parliament at the time that the closure of the embassy reduced relations with Iran to the lowest level possible.

Hague also said it was clear that the Iranian authorities could have protected the embassy, and said the protests could not have taken place without the consent of the regime.

It was expected the countries would improve diplomatic relations two years ago and reopen their embassies, but technical issues delayed those plans. Reports of plans to reopen the embassy have repeatedly arisen over the years, as the countries have seen shared regional interests over several key political issues.

One reason Britain is opening its embassy now may be the fear that other European countries are beating the U.K. in a race for Iranian markets in advance of sanctions relief, the Guardian said. Hammond will be visiting Tehran with business leaders and his office's political director.

It's not the first time the embassy in Iran has been closed, and reopened. Following the Iranian Revolution in 1979, it was about nine years before Britain reopened its embassy. A year later, Britain closed its embassy again as Ayatollah Ruhollah Khomeini, who led the revolution and ruled Iran until his death in 1989, passed a fatwa -- or religious ruling -- calling for the death of British author Salman Rushdie.

The United States closed its embassy in Tehran after young revolutionaries stormed it in 1979 and held hostage 52 American diplomats and citizens for 444 days.