Republican Sen. Phil Boyle has formally filed with the state Board of Elections to run for sheriff of Suffolk County.

Boyle had been endorsed in March by the county Conservative Party committee to run for the post after members there were upset when the incumbent sheriff, Vincent DeMarco, testified in a case that ultimately resulted in the conviction of a party functionary, Ed Walsh.

Boyle, a former Assembly without law enforcement experience, is the latest state lawmaker to seek office on the local level.

Democratic Sen. George Latimer is running for Westchester County executive, while several Assembly lawmakers have filed to run in local county executive races. Mickey Kearns, a Democrat from western New York, is running for Erie County comptroller.

Another Democratic senator, Ruben Diaz, is running for city Council.

Democrat Bill Perkins left the Senate this year for a city Council seat; Republican Assemblyman Joseph Saladino resigned after he was appointed Oyster Bay town supervisor.

Running in an off-year local race allows lawmakers to potentially receive a salary bump and still have a seat to return to next year should they lose.

Boyle was first elected to the Senate in 2012.