TALLAHASSEE, Fla. (AP) — A federal judge has ruled that the due process rights of a former Florida sheriff ousted by the governor following the Parkland high school massacre were not violated when the state Senate refused to reinstate him.

U.S. District Judge Mark Walker dismissed ex-Broward County Sheriff Scott Israel’s lawsuit on Tuesday. The lawsuit had been filed in November in Tallahassee federal court.

Israel contends that Gov. Ron DeSantis and the state Senate deprived him of due process and failed to follow a special master’s recommendation that he shouldn’t have been suspended from office. Shortly after taking office in January 2019, DeSantis removed Israel from his job, deeming him incompetent in his department’s response to the February 2018 shooting that killed 17 people at Marjory Stoneman Douglas High School.

The federal judged wrote in his order that Israel’s due process rights weren’t violated because the governor and Senate followed the legal process for removing an elected official from office, regardless of whether the removal was fair or justified.

DeSantis appointed Gregory Tony to replace Israel. Israel is running against Tony and others to get his old job back in this year’s election.

Israel’s attorney, Stuart Kaplan, said Israel is disappointed with the court’s decision but is focused on winning the upcoming election.