SACRAMENTO — In a deal indicating all sides appear ready to call a truce, Amazon.com is offering to back down from its referendum drive to repeal an online sales tax in exchange for a one-year moratorium on collecting the tax, sources close to the talks with Amazon said Wednesday night.

Under the deal, the Seattle-based online sales giant would agree to begin collecting the tax from California residents in September 2012, unless Congress takes action on Internet sales taxes before then. The federal deal would supersede any agreement with California, according to sources who declined to be identified because the deal was not yet public.

It was a breathtaking turnabout a week after the Mercury News and the Bay Area News Group broke the news that Amazon had offered a deal that was quickly shot down by retailers and Democrats, who maintained that Amazon was merely trying to delay paying taxes.

Just on Tuesday, a group of Democrats insisted there would be no deal and that they would pursue legislation to kill the referendum with a two-third votes in the Legislature. When that bill appeared to lack Republican support, however, talks resumed.

While Democrats and Gov. Jerry Brown fretted that they would lose $200 million a year in sales taxes with such as a deal, it became clear that the state was having difficulty getting Amazon to collect taxes from their buyers and pay them to the state even after the law took effect on July 1. Looming large was the potential for losing an additional nine months of revenues once the referendum got on the ballot.

An agreement would essentially mean that California would lose out on more than a year of revenues but have the certainty of taxes thereafter.

“It’s a good deal,” said one source who was involved in the talks. “All those uncertainties are gone. A referendum, whether they’d win a referendum, whether we could get the votes, whether we’d have to get involved in a big fight. No worries about litigation.”

All sides planned to get together to finalize details Thursday, one source said.

Reach Steven Harmon at 916-441-2101. Follow him at Twitter.com/ssharmon. Read the Political Blotter at IBAbuzz.com/politics.