ISTANBUL — The spiritual leader of Eastern Orthodox Christians worldwide recognized the independence of the Orthodox Church of Ukraine in a four-hour ceremony in Istanbul on Sunday, formalizing a split with the Russian church to which it had been tied for more than four centuries.

Ecumenical Patriarch Bartholomew I, the spiritual leader, handed a Tomos of Autocephaly containing a decree of independence to the newly appointed Metropolitan Epiphanius of Ukraine, cleaving millions of Ukrainians from the Russian Orthodox Church.

The independence effort outraged political and religious leaders in Russia. But for President Petro O. Poroshenko of Ukraine, who stood before an elevated throne throughout the ceremony in Istanbul, the occasion was an affirmation of independence from Russian influence in his embattled country and a boost ahead of elections in March.

“Tomos for us is actually another act of proclaiming Ukraine’s independence,” Mr. Poroshenko said in an address. “For Ukrainians, our own Church is a guarantee of our spiritual freedom. This is the key to social harmony.”