Congress has passed legislation to stop demonstrators from picketing military funerals at federal cemeteries.
Church members say they are exercising free speech
"It is a sad but necessary measure to protect what should be recognised...as a solemn, private and deeply sacred occasion," Senator Bill Frist said.
The measure follows a series of protests by a Kansas church group at military burials around the country.
The group believes the casualties in Iraq are a sign of God's anger at US tolerance of homosexuality.
President Bush is now expected to sign the Respect for America's Fallen Heroes Act, which would bar protests at national cemeteries for one hour before and after a funeral.
The sponsor of the bill, Republican Congressman Mike Rogers, said he was prompted to act after attending a military funeral in his home state of Michigan.
Mourners were greeted by "chants and taunting and some of the most vile things I have ever heard", he told the Associated Press.
The Kansas church group, led by the Rev Fred Phelps, has been involved in picketing funerals, carrying placards with messages such as "God Hates Fags".
Motorcycle groups are determined to show their respect
Their actions have prompted counter-demonstrations.
A motorcycle group called the Patriot Guard Riders has been appearing at funerals to pay its respects to the dead and to protect relatives from protests.
Mr Phelps has said Congress is "blatantly violating the First Amendment", which guarantees free speech.
He has said he will continue to demonstrate but abide by the resections, AP news agency reports.
Under the legislation, protests are banned within 300ft (90m) of the entrance to a cemetery and within 150ft (45m) of a road into the cemetery.
Violations would be punishable by up to $100,000 (£53,000) and up to a year in jail.
The law applies only to cemeteries under the control of the National Cemetery Administration and Arlington National Cemetery.
Several states are considering similar legislation to restrict demonstrations at non-federal sites.