A day after state lawmakers accused the United Nations of trying to "infiltrate" local governments, the Republican-controlled Kansas Senate adopted a bill banning foreign law from being used in state courts.

By a 33-3 vote, the Senate approved the so-called Sharia law ban, sending the bill to Gov. Sam Brownback's desk. The law would prohibit laws of foreign countries from being used to decide Kansas court cases. While the bill does not specifically name the Islamic moral code of Sharia law, the bill is modeled after similar measures in other states. The Republican-controlled Kansas House of Representatives unanimously passed the bill earlier this month.

The move surprised Topeka legislative insiders, who said that they did not expect the Senate, controlled by moderate Republicans, to take up the legislation. One legislator said that he believes a factor in the Senate passage is August primary election challenges of incumbent GOP moderates by conservative candidates.

"Clearly someone over there is trying to fluff up their conservative credentials," Rep. Mike Slattery (D-Mission) said.

Two of the three Senate dissenters -- Republicans John Vratil and Tim Owens -- are moderates facing strong conservative challengers in August. The third is Democrat Marci Francisco. Senate President Steve Morris (R-Hugoton), a moderate facing a conservative challenger, did not return a call for comment.

Republican supporters of the legislation said they believe it is needed to make sure state judges follow U.S. law. "It is something that is common sense," Rep. Brett Hildabrand (R-Merriam) told HuffPost. "In the U.S., only the Constitution is what you should look to."

Hildabrand said that while the use of foreign laws has not been widespread in Kansas courts, he cited a child custody case in which a Kansas man moved his three children to the Gaza Strip over his ex-wife's objections. Legislative observers told HuffPost that Democrats did not fight the legislation in the House because they believe it will have no impact on courts.

While the Senate voted to ban Islamic law, House members passed a wide-ranging alcohol bill that legalizes happy hour in Kansas. Under the state's strict liquor laws, happy hour has been outlawed for years, but bars could do day-long drink specials, known as "happy days."

Among the other provisions, the law legalizes alcohol consumption at county fairs, bans out-of-state ownership of wineries and microbreweries and requires that wine labeled Kansas wine contain at least 30 percent Kansas grapes, a decrease in current standards. Kansas currently has 300 acres of vineyards with 140 acres of wine-producing grapes. Advocates said the bill will spur economic growth. Opponents said the bill could cause more alcohol-related crimes by legalizing happy hour. Opponents also said alcohol should not be legalized at county fairs because children attend. Other states allow alcohol at fairs.

Slattery said the bill passed to fend off efforts to attach a measure allowing the sale of wine in supermarkets. "The fear was if we didn't pass it, it would go back to committee and that would be added on," Slattery said.

Both bills now head to Brownback for his signature or veto.

The House on Thursday passed a resolution opposing U.N. Agenda 21, saying that the international sustainability guidelines is "trying to destroy the American way of life" through land-use planning that encourages bike paths, parks and reduced energy consumption.