LONDON — Britain has lifted an advisory against travel to Tunisia, paving the way for tourists to return to the country’s Mediterranean beaches two years after a deadly attack.

The U.K. government had advised against all but essential travel to the North African country since a gunman stormed a luxury hotel in the resort of Sousse in June 2015, killing 38 people, 30 of them British.

The Foreign Office said Wednesday it no longer advises against travel to most of Tunisia, including major tourist resorts and the capital, Tunis. Foreign Office Minister Alistair Burt said the decision was partly due to security improvements made since then.

The U.K. tourism organization ABTA said the change meant “travel companies can put in place plans for holidays to Tunisia to restart, should they wish.”