According to the sources, who spoke on condition of anonymity due to restrictions on talking to the media, Erdogan said the Orlando shooting "once again" revealed the need for the international community to be together in the struggle against terrorism.

The Turkish president also said Islam must not be associated with terrorism, adding that terrorism was "one of the greatest crimes against humanity."

The two leaders agreed to maintain cooperation and consultation on any topic related to the Middle East, particularly Syria.

Meanwhile, during his address to foreign ambassadors and Foreign Economic Relations Board members at the Presidential Palace in Ankara late Wednesday, Erdogan said: "Terrorism is a common problem of humanity."

He added that Turkey had been "always open" to cooperation against terrorism.

"Let's take up a position against terrorists regardless of their identity, discourse, roots and faith," he said.

Turkish Prime Minister Binali Yildirim also called U.S. Vice President Joe Biden, and condemned Orlando shooting, and said Turkey shared their grief.

U.S. citizen Omar Mateen killed 49 victims and wounded 53 others at a gay nightclub in Orlando, Florida.

The massacre is considered by many to be the deadliest shooting in American history.

Anadolu Agency