MEXICO CITY — Mexican legislators are preparing to write the military’s role in the drug war into law, drawing fire from critics who say the legislation will keep soldiers on Mexico’s streets indefinitely and lead to the suspension of basic civil rights.

A vote by the lower house of Congress, the Chamber of Deputies, could come as early as Thursday before debate moves to the Senate as sponsors seek passage by Dec. 15.

Supporters say the measure would provide a legal framework for Mexico’s armed forces to continue battling organized crime under a presidential declaration. The military has led operations against criminal gangs for more than a decade based on little more than a command from the president and the request of state governors. Over the past year, the defense secretary, Gen. Salvador Cienfuegos, has pressed for a law to guide deployments.

But a wide array of critics, including constitutional lawyers and human rights groups, say the legislation will cement the military’s leadership in the drug war, putting it beyond civilian oversight and removing any incentive for state and local leaders to build effective police forces.