PHOENIX — Arizona legislators quickly approved emergency legislation Tuesday to head off picketing by a Topeka church near the funeral service for a 9-year-old girl who was killed in the Tucson shootings.

Unanimous votes by the House and Senate sent the bill to Gov. Jan Brewer, who signed it Tuesday evening. It took effect immediately.

The bill "will assure that the victims of Saturday's tragic shooting in Tucson will be laid to rest in peace with the full dignity and respect that they deserve," Brewer said in a statement, praising lawmakers for "a remarkable spirit of unity and togetherness."

Without specifically mentioning the Tucson shooting, the new law prohibits protests at or near funeral sites.

Dozens of lawmakers co-sponsored the bill, and legislative action was completed within 90 minutes. The Senate's committee hearing took just three minutes.

Westboro Baptist Church said Monday it plans to picket Thursday's funeral for Christina Taylor Green because "God sent the shooter to deal with idolatrous America." The fundamentalist church has picketed many military funerals to draw attention to its view that the deaths are God's punishment for the nation's tolerance of homosexuality.

Lawmakers denounced the church's plan to picket a child's funeral.

"This is just horrific that people have to deal with this. We shouldn't have to do this in time of great pain for our state," said Sen. Kyrsten Sinema, a Phoenix Democrat.

The girl was the youngest of the six people killed during the shooting at an event held by U.S. Rep. Gabrielle Giffords, who was among 14 people injured. Giffords was shot in the head and critically wounded.

Numerous states have passed laws restricting protests at funerals after members of the Westboro church began protesting at the funerals of troops killed in Iraq and Afghanistan.

The Arizona legislation is modeled on an Ohio law that was upheld by the 6th U.S. Circuit Court of Appeals, Sinema said.

The four-paragraph Arizona bill makes it a misdemeanor punishable by up to six months in jail to picket or conduct other protest activities within 300 feet of a funeral or burial service — about the length of a football field. The prohibition applies from one hour before the event to one hour after.

Shirley Phelps-Roper, a church member and a daughter of its pastor, Fred W. Phelps Sr., said the prohibition wouldn't matter because church members plan to picket at one of two intersections more than 1,000 feet from the church where the girl's service will be held.

Phelps-Roper also said church members plan picketing Friday in conjunction with a service for another victim of the shooting, U.S. District Judge John M. Roll.

Sen. Paula Aboud, a Tucson Democrat, said volunteers in Tucson were organizing a human shield to block the protesters from view of victim family members.

Sinema said the prohibition applies only to funeral and burial sites because courts have struck down picketing prohibitions for procession routes.

"This is a good compromise that doesn't trample our God-given rights," said Senate President Russell Pearce, a Mesa Republican.

Sen. Ron Gould, a Republican from Lake Havasu City, voted for the bill but earlier was the only senator who objected to suspending rules requiring several days of legislative consideration before a final vote.

Gould cited the public's right to know what lawmakers are considering. "And when we suspend those rules mistakes get made," he added.