It was a tense two hours in Rockville on Thursday night, as dozens of business leaders, developers, residents and politicians testified at a council hearing about controversial legislation on big-box stores.

The bill, introduced last month by Council President Valerie Ervin (D-Silver Spring), would require all big-box stores, including Wal-Mart, to meet with community groups and try to agree on subjects ranging from wages and benefits to traffic and environmental issues.

The legislation comes as the retailer is moving forward with plans to open stores in Aspen Hill and Rockville Pike and to expand its sole Montgomery store, in Germantown. The retailer also has plans for stores in the District, Tysons Corner, Oxon Hill and possibly Shirlington.

Two loosely organized groups — one assembled by big business and developers, the other by bill sponsors and the grocery union United Food & Commercial Workers Union Local 400 — turned out Tuesday night for the hearing.

Generally, large businesses, developers and chambers of commerce voiced opposition to the bill opposed the bill, while labor leaders, small businesses and the attending state politicians — Del. Sam Arora (D-Montgomery), Del. Susan C. Lee (D-Montgomery) and Sen. Roger Manno (D-Montgomery) — supported. Residents belonged to both groups.

Modeled after legislation being considered in the District, the bill would change how Montgomery handles big-box stores.

Currently, a developer has its plans scrutinized by the government. In addition to fulfilling environmental and other zoning requirements, the developer sometimes must meet with community members. Depending on the size of the project, the government can compel the developer to provide public benefits, such as an environmentally friendly design or affordable housing.

The legislation would ensure that the public has a direct role in big-box developments. It would require store officials to sit down with recognized civic association and sign, or make a good-faith effort to create, a legally enforceable community benefits agreement that could establish, for example, a living wage.

Supporters say that it promotes community input and protects small businesses that would be displaced by big box stores, including Wal-mart.

“Communities should have a voice in the development of big boxes,” said Tony Perez, who represents the UFCW Local 400, which worked with Ervin to craft the bill, at the hearing.

Opponents say that the bill is too vague to be help anyone, that it intrudes on the county’s zoning processes and that it could be unconstitutional.

“[The bill is] unwarranted, unnecessary, unworkable, anti-business and frankly unbelievable,” said Jane Redicker, president of the Greater Silver Spring Chamber of Commerce, at the hearing.

One person who did not testify during the hearing was County Executive Isiah Leggett (D). Council members said his office has lobbied heavily against the bill, and he said in a recent interview that he could not support the bill as as drafted.

One reason is that he is concerned about the legislation’s impact on a Costco planned for Wheaton, a project for which Leggett helped secure a $4 million county subsidy from the County Council. Late last month, he received a call from the developer’s legal representative, Devin Doolan, that it had halted prep work in protest of the bill.

But Leggett would not go as far as to say he would veto the legislation. The sponsors are planning to make some substantial amendments or change to the bill, he said. “I want to see what the changes are before I go any further.”