A Tunisia military doctor killed in the Istanbul airport attack had travelled to the country to try to convince his son to leave ISIS.

Brigadier General Fathi Bayoudh, was among the 41 people who died when three suspected ISIS bombers opened fire before blowing themselves up at Ataturk Airport on Tuesday evening.

The Tunisian Defence Ministry confirmed that Brigadier General Bayoudh, who worked in a military hospital was one of those killed in the explosions.

Scroll down for video

Tunisian Brigadier Fathi Bayoudh, who was killed in the Istanbul airport attacks. He had travelled to Turkey to try and convince his son to leave ISIS in Syria

And a senior security source and local media have said he had been in Turkey to try and persuade his son to leave ISIS in Syria.

A security source said: 'Bayoudh travelled to Turkey in an effort to meet his son, who joined Islamic State in Syria a few months ago with his girlfriend.

The source explained the son had now been detained by Turkish troops on the border with Syria.

They added: 'Bayoudh's son travelled with his girlfriend who studied with him at the Faculty of Medicine a few months ago, which prompted several attempts by his father to persuade him to return.'

Several local Tunisian newspapers online and radio also cited other security sources saying Bayoudh was in Turkey to met his son to try to persuade him to come home.

At least 41 people died when three suspected ISIS bombers opened fire before blowing themselves up at Ataturk Airport on Tuesday evening

Paramedics rush those seriously injured in the attacks to stretchers after three suicide bombers blew themselves up

Tunisia has become a model of democratic reform in the Arab world since its 2011 uprising against autocrat Zine El Abidine Ben Ali. But it is also one of the largest sources of foreign fighters for Islamist groups in Iraq and Syria.

Government officials estimate more than 3,500 Tunisians have left to fight for Islamic State and other groups in Syria, Iraq and Libya, some in command positions.

Some are recruited from impoverished areas in the North African nation, but others are professionals and graduates recruited online by jihadists.

The news came as funerals for some of the victims began while Turkish authorities sought to put together an attack timeline, going through surveillance footage and interviewing witnesses.

A Turkish court imposed a media ban on any information not officially released by the government.

People flee for their lives after hearing gunshots and explosions ring out in the arrivals hall at Ataturk airport

The devastation at Istanbul's airport was a reminder of the March 22 attack on the Brussels airport, where two suicide bombings ripped through check-in counters, killing 16 people.

The Islamic State group claimed responsibility for that attack, as well as an explosion the same day at a Brussels subway station that killed 16 more people.

Turkey has suffered a series of attacks that have frightened away visitors and devastated its economy, which relies heavily on tourism.

The government has stepped up controls at airports and land borders and deported thousands of foreign fighters, but has struggled to tackle the extremist threat while also conducting security operations against Kurdish rebels.