BEIRUT, Lebanon — Turkey’s leader denounced President Bashar al-Assad of Syria on Wednesday as a terrorist mass murderer with no place in that country’s postwar future, scrapping a softened approach that Turkish officials had taken toward Mr. Assad in recent years.

The statement by President Recep Tayyip Erdogan of Turkey came as Mr. Assad seemed more confident than ever that he has won the war and will remain Syria’s leader for the foreseeable future. It also came against the backdrop of maneuvering by many powers — most notably Russia and Iran, Mr. Assad’s most important allies — to influence the outcome of a devastating conflict that has reshaped Middle East politics.

One of the first leaders in the region to condemn Mr. Assad when the conflict began in 2011, Mr. Erdogan had in recent months signaled a willingness to accept Mr. Assad’s political longevity.

The Turkish leader’s shift on Wednesday was a reminder of their hostility, coming as Mr. Assad has demonstrated greater swagger over his grip from military gains over the past year, largely with Russia’s help.