Betting on sporting events is prohibited in California. With limited exceptions for small office pools, the Penal Code deems it illegal to make or accept a bet or wager on the outcome of a contest of skill, speed, or endurance between humans, animals, or mechanical machinery. Violation of this provision is punishable by up to six months in jail and a fine. The ban on sports betting applies only to California residents and businesses. Non-residents are free to gamble on sporting events as long as they have no intention of returning to California. In addition, the State Constitution prohibits local governments from passing laws that prohibit gambling within their boundaries. Thus, cities and counties can choose whether or not to allow sports betting, but if they do permit it, they cannot restrict its practice to non-residents. In 1992, California became the first state to legalize sports betting to some extent. The California Pari-Mutuel Commission was given authority to regulate sports books and issue licenses. However, the law allowed only two companies to operate sports books in California and only one of those firms had applied for a license at the time it went into effect. Since then, several other states have passed legislation allowing sports betting. Some of these statutes were ruled unconstitutional by the courts, but others are still in effect. By contrast, California's statute has never been challenged in court and so remains in force.