Updated on May 5 at 8:29 a.m. ET

Turkish Prime Minister Ahmet Davutoglu has stepped down after a power struggle with President Recep Tayyip Erdogan.

“I decided that for the unity of the (ruling party) a change of chairman would be more appropriate,” Davutoglu said. “I am not considering running at the May 22 congress.”

He will remain in office until then. The move allows Erdogan to tighten his grip on power. The two men have clashed since Davutoglu became prime minister. As Bloomberg explains:

Erdogan ran Turkey for more than a decade as prime minister and has sought to maintain his tight grip on power even after moving up to the presidency, traditionally a largely ceremonial office, in 2014. His handpicked successor Davutoglu has struggled to assert his own authority.

Davutoglu’s authority had been weakened recently after party leadership stripped the prime minister of some powers. Before a meeting between the two leaders late Wednesday, Erdogan alluded to their tensions. He said, according to the Hurriyet Daily News, “What matters is that you should not forget how you got to your post.”