It may go down as one of the worst marketing blunders made by a tech firm this year.

Instagram’s plan to sell users’ photos as advertisements blew up in its face yesterday after an insta-revolt led to an insta-reversal.

The photo-sharing service, which Facebook bought this year, this week tweaked its terms of service, which could have allowed its marketing partners to use members’ photos — including those of children — in advertising campaigns without their knowledge.

The proposed move drew screams of protest from the legal community and celebrity users.

Daniel Jacobs, a lawyer for the Electronic Privacy Information Center, said he had never seen a terms of service that allowed what Instagram was proposing — not on other photo sites like Yahoo’s Flickr or video sites like YouTube.

“We had not seen a photo service that tried to claim the right to user photos for advertising without telling you it’s an ad and without compensation,” Jacobs said. “That seems to be a new one.”

Hollywood types went nuclear, too.

Supermodel Bar Refaeli, who envisioned the social network turning her personal photos into paid ads, recoiled in horror.

“I just read the new Instagram terms of use starting on Jan 16th. Seriously considering closing my account!.. It’s not OK!” she said.

Funnyman Jonah Hill chimed in with: “Instagram, you were my favorite app and you stabbed me in the back. I feel like I married you and you just slept with my best friend.”

Under a withering attack, Instagram late yesterday walked back its plans.

It claimed it was a misreading of the complex legal terms in its new agreement — which it said it would change.

“The language we proposed also raised questions about whether your photos can be part of an advertisement. We do not have plans for anything like this and because of that we’re going to remove the language,” Instagram CEO Kevin Systrom said in a blog post.

The new user agreement read: “You agree that a business or other entity may pay us to display your username, likeness, photos … in connection with paid or sponsored content or promotions, without any compensation to you.”

Instagram is under heavy pressure from Facebook, which agreed to pay $1 billion for the company in April, to show its worth.

Since it was bought, Instagram launched its first website outside of mobile devices, the company has linked its data with Facebook for advertising purposes and it has said it will start showing ads on the network.

Yesterday’s uproar was justified, because the language that Instagram proposed indicated the company would have the rights to far broader use of user photos beyond just their profile pictures, Jacobs said.

“The misunderstanding was not the fault of the users of the community who thought these terms would allow for a wide range of commercial use of their information,” Jacobs said. “As they were written, they would allow that.”