ALIAGA, Turkey — A Turkish court has convicted an American pastor at the center of a Turkish-American diplomatic dispute of terror charges, but has released him from house arrest and allowed him to leave Turkey.

The court near the western city of Izmir on Friday sentenced Andrew Brunson to 3 years and 1 month in prison for the conviction, but since the evangelical pastor has already spent two years in detention he won’t serve more time.