Hours before he arrived in Saudi Arabia on Tuesday, Turkish President Recep Tayyip Erdogan accused Syria's president of "mercilessly" killing hundreds of thousands of people and criticized Russia for backing him.

Mr. Erdogan was speaking to reporters before departing for Saudi Arabia, where he met King Salman for talks focused on the Syrian civil war and energy co-operation. Turkey and Saudi Arabia are strong backers of the rebels fighting to overthrow Syrian President Bashar al-Assad, who is supported by Russia and Iran.

Mr. Erdogan said his government and Saudi Arabia are working "in solidarity and consultation" to find a political solution for Syria, as both countries push for an agreement that would remove Mr. al-Assad from power.

Story continues below advertisement

The state-run Saudi Press Agency said Mr. Erdogan's talks with King Salman were attended by other senior Saudi royals and officials, including the kingdom's crown prince, the deputy crown prince and the ministers of finance, foreign affairs and information. Mr. Erdogan's delegation to Saudi Arabia includes the country's ministers of economy, energy and foreign affairs.

The two sides were expected to discuss energy co-operation as Ankara works to diversify its supplies following a rift with Moscow over the downing of a Russian plane.

The Saudi Press Agency confirmed the two leaders discussed the conflicts in Syria and Iraq, as well developments in war-torn Libya and Yemen, where Saudi forces are battling Shia rebels.

In comments apparently directed at Russia's military intervention in Syria, Mr. Erdogan said: "You cannot go anywhere by supporting a regime that has mercilessly killed 400,000 innocent people with conventional and chemical weapons."

Russia began air strikes in Syria on Sept. 30, saying it wanted to support the Syrian government and defeat Islamic State militants and other extremists. But many of the strikes have hit Western-backed rebel groups in areas where the Islamic State is not present, and Syrian activists say the Russian strikes have killed civilians.

The UN says at least 250,000 people have been killed in the nearly five-year Syrian conflict, and some 12 million people displaced, triggering a massive refugee crisis. What began in 2011 as mainly peaceful protests inspired by the Arab Spring eventually spiralled into an armed conflict pitting rebels against the military, drawing in global powers as well as extremist groups such as the Islamic State and al-Qaeda.

Though Kurdish fighters are among the strongest forces on the ground in Syria battling the Islamic State group, Mr. Erdogan told reporters before arriving in Saudi Arabia that countries backing the Kurds are "adding fuel to fire." Turkey considers the Kurdish forces in Syria terrorists because of their links to an outlawed Kurdish rebel group in Turkey.

Story continues below advertisement

When Saudi Arabia hosted a meeting of major Syrian opposition groups this month, the main Kurdish militia known as the YPG and the largest Kurdish group, the Democratic Union Party or PYD, were not invited.

This is Mr. Erdogan's third visit to Saudi Arabia this year. He flew to Riyadh in January to attend the late King Abdullah's funeral and again in March for bilateral talks with King Salman. The two leaders also met at the G20 summit held in Turkey last month.

Saudi-Turkish ties were strained under King Abdullah, who saw Turkey's support of Egypt's Muslim Brotherhood group as a destabilizing threat to the region. Ties between the two countries have since improved under the new monarch King Salman, who has worked closely with Sunni countries to stymie the reach of Saudi Arabia's top regional foe, Shia Iran.

Turkey is a member of the 34-country Islamic military alliance that Saudi Arabia announced this month.