In February 1806, Ottoman Emperor Selim III recognized Napoleon as Emperor. He also opted for an alliance with France, calling France "our sincere and natural ally".
That decision brought the Ottoman Empire into a losing war against Russia and Britain.