San Francisco's city attorney issued a cease-and-desist demand Monday to a mobile app called Monkey Parking, which allows people to auction public parking spaces that they're using to other nearby drivers.

In a letter to Paolo Dobrowolny, the CEO of the Rome, Italy-based tech startup, city attorney Dennis Herrera cited a provision in San Francisco's police code that prohibits people and companies from buying, selling or leasing public on-street parking and mandates fees of up to $300 for drivers who violate the law.

Herrera's warning to Monkey Parking is the latest attempt by city government officials and state lawmakers nationwide trying to figure out how to regulate Web-based businesses that offer shared parking, transportation and housing services using mobile applications. Among the more popular ridesharing services are Uber and Lyft, and popular housing apps include Airbnb.

The Monkey Parking app allows drivers to get an often elusive parking spot and sell it for $5, $10, even $20, and then wait until the buyer arrives to take their place.

Herrera has given its creators until July 11 to shut down operations in San Francisco or possibly face a lawsuit under California's Unfair Competition Law. Herrera added that besides the violations, Monkey Parking's app encourages drivers to unsafely use their mobile devices and engage in online parking bidding wars while behind the wheel.

Dobrowolny said in an email Monday that he is talking with his legal staff and didn't immediately have a specific comment about the letter.

"As a general principle, we believe that a new company providing value to people should be regulated and not banned," Dobrowolny wrote. "This applies also to companies like Airbnb, Uber and Lyft that are continuously facing difficulties while delivering something that makes users happy. Regulation is fundamental in driving innovation, while banning is just stopping it."

The city attorney's warning to Monkey Parking comes about a month after his office started investigating the startup, which began its San Francisco operations in April.

"Technology has given rise to many laudable innovations in how we live and work -- and Monkey Parking is not one of them. It's illegal, it puts drivers on the hook for $300 fines, and it creates a predatory private market for public parking spaces that San Franciscans will not tolerate," Herrera said in a written statement. "People are free to rent out their own private driveways and garage spaces should they choose to do so. But we will not abide businesses that hold hostage on-street public parking spots for their own private profit."

Parking in San Francisco has long been known as a driver's worst nightmare. A recent San Francisco Municipal Transportation Agency parking census reported that the city has 440,000 parking spots available -- but only 275,000 of those are street parking.

Herrera's letter to Monkey Parking also asked Apple Inc. to immediately remove Monkey Parking from its app store. Apple did not immediately respond to emails seeking comment.

San Francisco-based technology expert Charles Belle, who runs the Startup Policy Lab, whose objective is to connect the startup community with policymakers and government, believes the issue between Monkey Parking and the city attorney is a great example of the need to create more forums for the two entities to engage.

"Companies need to be familiar with local laws, but threatened legal actions, such as cease-and-desist letters, only divert attention away from the opportunity to rethink how the community can use technology to improve government services," said Belle, who's a former executive director the Privacy and Technology Project at the University of California, Hastings College of the Law.

Two other tech companies, Sweetch and ParkModo, which Herrera said also violates city and state laws, will receive similar cease-and-desist warnings later this week. Sweetch co-founder Hamza Ouazzani Chahdi, whose $5-per-parking-spot swapping app was also warned to cease and desist, said Monday the goal is just to reduce congestion, which creates pollution and other problems.

"We don't understand why they want to shut us down. We are trying to solve the huge parking problem, which is not only bad for drivers but for all the city," he said.

ParkModo did not immediately respond to requests for comment.