Legislation passed by Congress would require all federal agencies in a state to comply with a governor's request that they fly their flags at half-staff to honor a fallen service member.

The bill, which now goes to President Bush for his signature, was crafted by Rep. Bart Stupak, D-Mich., who was upset by what he said was the "inconsistent, patchwork display of respect" in his state toward troops killed in Iraq and Afghanistan.

The House passed the bill in May and the Senate approved it late Thursday — Flag Day — on a voice vote.

The measure would amend federal law with regard to the flying of the national flag at half-staff to allow a governor to require that federal facilities in the state lower their flags when a member of the armed forces from that state dies while on active duty.

It is named for Army Specialist Joseph P. Micks, a 22-year-old from Rapid River in the Upper Peninsula of Michigan who was killed in Iraq last year.

Stupak said there were several instances in his state of federal facilities ignoring the governor's request to lower flags, and this was particularly painful in rural communities when funeral facilities pass through multiple communities, some with lowered flags, some without.

In the Senate, the bill was backed by Armed Services Committee Chairman Carl Levin, D-Mich., who said that flying the flag at half-staff was "one of the most powerful ways we honor those who have made the ultimate sacrifice."

More than 3,800 Members of the military have died as a result of the wars in Afghanistan and Iraq.