A Senate panel advanced a bill Thursday to curb the Justice Department’s power to replace federal prosecutors after seven forced resignations sparked accusations of political favoritism.

The Judiciary Committee voted 13-6 to send the measure to the Senate floor, where it is certain to face opposition from Republicans who oppose giving more appointment power to federal judges.