[What you need to know to start the day: Get New York Today in your inbox.]

It was variously described as a rite of passage, a take-your-medicine moment and a very New York-style welcome: Two Amazon executives raised their right hands and then faced more than three hours of public grilling by the New York City Council.

But if the ritual of barbed questions and evasive answers was not unusual, the circumstances of Wednesday’s hearing were: Amazon does not need the Council’s approval to locate new offices in Long Island City, Queens. Still, the appearance marked the company’s first major foray into New York’s public spotlight since announcing the deal.

Council members took advantage of the executives sitting before them to vent their anger at the terms of the agreement, as well as at Amazon’s business practices, treatment of labor unions and work on behalf of federal immigration officials.

They were backed up, with applause, shouts and jeers, by a spectrum of liberal opponents who packed the Council’s chambers, unfurling an anti-Amazon banner from the balcony at the start of the hearing. Several times the crowd drowned out the two executives as they attempted to explain the merits of the deal struck with the company last month by Gov. Andrew M. Cuomo and Mayor Bill de Blasio.