SAN FRANCISCO – Gov. Jerry Brown signed legislation Friday that postpones new sales-tax rules that would have affected online purchases in California, granting more time for traditional and online retailers to lobby Congress for a national standard on the high-stakes issue.

The bill, crafted as a compromise among Amazon.com, traditional retailers and California lawmakers searching for ways to raise revenue, delays until at least September 2012 online tax rules implemented as part of this year’s state budget package.

Under the compromise, Amazon will drop a ballot referendum planned for next year to overturn the law passed earlier in the summer, a move that promised an ugly and expensive campaign fight between online and traditional retailers.

“When you get two threats, that gives you an opportunity to find a compromise,” Brown said after he signed the bill at Gap Inc. offices in San Francisco. “Hopefully, (the bill) will set an example for our colleagues in Washington that they too can cooperate.”

If that effort fails, Amazon has agreed to start collecting sales tax from California customers. The budget bill signed previously by Brown forced more online retailers to collect the state sales tax effective July 1. The move prompted Amazon to cut ties with some 25,000 affiliate businesses in California and spend more than $5 million to collect signatures for the ballot referendum.

The compromise bill will cost California an estimated $200 million in tax revenue during the current fiscal year but helps both sides avoid a costly election contest and the possibility of legal challenges.

State taxing authorities estimate that California loses at least $83 million a year in uncollected state and local use tax attributed to Amazon’s sales.

Under the deal, the retailing giant will rekindle its relationship with its California affiliates and has promised to create at least 10,000 full-time jobs and hire 25,000 seasonal employees in the state by the end of 2015.

At the bill signing, Amazon’s vice president of global public policy, Paul Misener, said the company would bring $500 million in investment to California over the next several years, mainly in the form of massive distribution centers.