Travel operator Thomas Cook has warned of a £39 million earnings hit from the combined impact of the terrorist atrocity in Tunisia, the Greek debt crisis and the weakening of the euro.

The attack, which last month claimed the lives of 38 holidaymakers including 30 UK nationals is expected to have a £20 million impact on the company's full-year results with a further effect possible next year.

Thomas Cook said this took into account the impact of cancelled trips, rearranging the summer flying programme to alternative destinations and the cost of repatriating customers to the UK.

The group sells 600-700,000 holidays to the North African country every year but has seen this wiped out as the Foreign Office and other governments in Europe officially advised against travelling there.

Chief executive Peter Fankhauser said: "Our business has been impacted by significant external shocks."

Thomas Cook evacuated more than 15,000 guests on around 60 flights in the wake of the murders in Tunisia but Mr Fankhauser said the country would once again become a tourist hot-spot.

He said: "Definitely Tunisia going forward is going to be a popular destination again. It is a fact that terrorist attacks can happen anywhere.

"It happened in London, it happened in Paris, it happened in Madrid and unfortunately it happened in Tunisia. Tunisia can recover and Tunisia is a holiday destination with a great value for money product."

Mr Fankhauser said he had travelled to visit the Tunisian prime minister to seek reassurance on how the country can make sure tourists are kept safe and would be returning there shortly.

The group said there could be "continued adverse impact" on the following year should the Foreign Office continue to advise against travel and demand fail to return to former levels as tourists shun the country.

The Greece crisis will have a £5 million impact in the current year as the firm had to ramp up reductions on late bookings amid fears of problems the debt-laden country could face as it came to the brink of collapse before reaching agreement with creditors.

Meanwhile the strength of the pound against the euro and the Swedish krona was expected to have a £39 million impact on full-year results, up from the £25 million previously expected.

It came as Thomas Cook reported an improved performance in the three months to the end of June. Pre-tax losses nearly halved from £81 million to £44 million.

The group saw an operating profit, stripping out finance charges, of £3 million, up from a £50 million loss at the same time last year.

Mr Fankhauser said it was the first time it had been able to announce a positive third quarter operating result in six years.

Revenues were flat, however, edging up by just 0.2% to £1.95 billion amid weaker demand, particularly in April. The company had previously warned of the weakness.

The summer season for this year was 78% sold for the group as a whole and 84% in the UK - the latter 1% lower than last year, with average selling prices also 1% lower as the group expands its "seats only" business.

Analysts had been expecting underlying earnings for the year at £340 million. Experts at Jefferies said this was likely to come down by 10% in the wake of today's figures.

"Although these events are largely outside the company's control they will, nevertheless, weigh on the shares in the short term," they said. Shares fell 1%.