Google's threat escalates a battle with publishers such as News Corp that is being closely watched around the world. The search giant had warned that its 19 million Australian users would face degraded search and YouTube experiences if the new code were enforced.
Australia is on course to pass laws that would make tech giants negotiate payments with local publishers and broadcasters for content included in search results or news feeds. If they cannot strike a deal, a government-appointed arbitrator will decide the price.
"Coupled with the unmanageable financial and operational risk if this version of the Code were to become law, it would give us no real choice but to stop making Google Search available in Australia," Mel Silva, managing director for Australia and New Zealand, told a senate committee.
Silva made no mention of YouTube in prepared remarks, as the video service is expected to be exempted under revisions to the code last month.
Google's comments drew a sharp rebuke from Australian Prime Minister Scott Morrison who said the country makes its rules for "things you can do in Australia."
"People who want to work with that in Australia, you're very welcome. But we don't respond to threats," Morrison told reporters.
At the inquiry, Australian Competition and Consumer Commission chair Rod Sims, who has overseen the new rules, said he could not predict what the tech giants would do but said "there's always brinkmanship in serious negotiations".
"They talk of commercial deals where they're in full control of the deal," he said. "In my view that's not a commercial deal."
Google has called the code overly broad and said that without revisions, offering even a limited search tool would be too risky. The company does not disclose sales from Australia, but search ads are its biggest contributor to revenue and profit globally.
The United States government this week asked Australia to scrap the proposed laws, which have broad political support, and suggested Australia should pursue a voluntary code instead.
Australia announced the legislation last month after an investigation found Google and social media giant Facebook held too much market power in the media industry, a situation it said posed a potential threat to a well-functioning democracy.
Google's threat to limit its services in Australia came just hours after the internet giant reached a content-payment deal with some French news publishers as part of three-year, $1.3-billion push to support publishers.
Google's testimony "is part of a pattern of threatening behaviour that is chilling for anyone who values our democracy," said Peter Lewis, director of the Australia Institute's Centre for Responsible Technology.
(Reporting by Renju Jose; Editing by Byron Kaye and Gerry Doyle)
By Renju Jose