When the U.S. Supreme Court toppled the constitutional right to abortion, some prosecutors in cities and counties across the country vowed to refrain from enforcing new state-imposed bans on the procedure. But such promises may be hard to keep.

Just ask Andrew Warren, the twice-elected state attorney in Hillsborough County, Florida, a state where abortion is now illegal after 15 weeks of pregnancy. In June, after the Supreme Court ruling, Warren joined a group of prosecutors and some state attorneys general in a written pledge not to pursue criminal charges in abortion cases. By August, he was out of a job.

Governor Ron DeSantis ousted Warren and appointed a replacement, saying Warren had neglected his duty and that state attorneys can’t pick and choose which laws they agree with. Warren sued DeSantis in federal court on Wednesday, claiming the governor violated his right of free speech and his "absolute” discretion to decide whether and how to prosecute crimes in the county, which includes Tampa.