MADRID — A Syrian Kurd has been sentenced to three years in jail in Spain for throwing a shoe at Turkish Prime Minister Recep Tayyip Erdogan.

Hokman Joma tried to hit Erdogan with a shoe Feb. 22 as the Turkish leader got into a car during a visit to the southern city of Seville.

Hokman shouted "Long live Kurdistan" in Spanish before being arrested.

Turkey has been battling Kurdish rebels since 1984.

The Justice Department for the southern region of Andalusia said Wednesday a provincial court has rejected an appeal by Hokman and upheld the sentence passed in June.

An Iraqi journalist who tried to hit former U.S. President George W. Bush with his shoes in Baghdad in 2008 had a three-year sentence reduced to one year. He was released last year.