San Francisco has become the first city in the nation to outlaw chewing tobacco from its playing fields, including AT&T Park, home to the San Francisco Giants.

Players and the manager of the team expressed support for the ordinance signed into law by Mayor Ed Lee on Friday but also concern about breaking the chewing habit.

The ordinance, which will take effect Jan. 1, prohibits the use of smokeless tobacco at athletic venues, specifically singling out baseball, which has a long history of players masticating and spitting tobacco juice in view of children who worship them.

"It's a step in the right direction," said Giants manager Bruce Bochy, who has chewed tobacco on and off for decades but quit at one point with help from a hypnotist.

"It's a tough deal for some of these players who have grown up playing with it and there are so many triggers in the game," Bochy added. "I certainly don't endorse it. With my two sons, the one thing I asked them is don't ever start dipping."

The San Francisco ordinance is part of an overall push by the Campaign for Tobacco-Free Kids, based in Washington, D.C., which targeted the city and California to promote its anti-smoking efforts. An even more expansive bill outlawing all tobacco use, including electronic cigarettes and smokeless tobacco, wherever an organized game of baseball is played in California is making its way through the Assembly.

"Today, San Francisco entered the history books as the first city to take tobacco out of baseball. The home of the world champion Giants has set an example that all of Major League Baseball and the rest of the country should quickly follow," said Matthew L. Myers, president of the Campaign for Tobacco-Free Kids.

Smokeless tobacco includes moist snuff and chewing tobacco.

Use of smokeless tobacco has been prohibited in the minor leagues since June 15, 1993. Because major leaguers are unionized, Major League Baseball can't ban it without an agreement with the Major League Baseball Players Association. Under the current labor contract, players, managers and coaches cannot chew tobacco during interviews, and they can't carry tobacco while wearing a uniform when fans are in the ballpark.

The league said it supports the efforts of the city of San Francisco "to protect our nation's youth by eliminating smokeless tobacco products from all ballparks."

"We're aware of the signing of the law and have no public comment at this time," players' union spokesman Greg Bouris said.

World Series MVP Madison Bumgarner chews tobacco but said he quit for about three months this spring before recently picking up the habit again. He said he will try to quit again before next season when the ban begins.

"I'll be all right. I can quit," Bumgarner said. "I quit every once in a while for a little while to make sure I can do it."

"Hopefully it will be a positive thing for us players," he said. "It's not an easy thing to stop."

Nearly 15 percent of boys in U.S. high schools currently use smokeless tobacco, and use is even higher among students who play organized sports than among non-athletes, according to a recent report by researchers at the University of California, San Francisco. The use of smokeless tobacco increases the risk of cancer, gum disease and addiction to nicotine, the report states.

Player rep and pitcher Matt Cain, who does not chew, said he expects multiple discussions with the team to prepare players for the transition.

"The hard part is going to be policing it," Cain said. "It'll be interesting to see what they do about making it a policy."

City officials say the ban on smokeless tobacco would be enforced the same way as regular smoking: by posting signs and removing violators from premises.