The Legislature’s Joint Committee on Public Service has held up for nearly a month a bill that would force the state’s pension fund to divest itself of stocks in fossil-fuel companies as lawmakers try to ensure that the fund’s portfolio value will not be harmed.

More than 100 members of the Massachusetts team of 350.org, an international movement to fight climate change, rallied outside the State House and visited legislative offices on Wednesday in hopes that the legislation will leave the committee within the next month.

“They’re working very hard on this bill, but I think they’re feeling some pressure in Legislature from fossil-fuel companies,” said Constance Gorfinkle, media coordinator for the South Shore node of 350 Massachusetts (350MA).

She said that teachers, lawmakers and union workers came out to speak on behalf of the proposed bill, which would reduce investments in fossil-fuel companies over a five-year period.

While the bill has created a debate among the candidates for state treasurer, Steven Grossman, the current state treasurer and a candidate for governor, has said he supports the measure as long as the goal of protecting the environment coincides with protection of state pensions.

Grossman said that when Sen. Benjamin Downing, D-Pittsfield, filed the bill, he was careful to include a clause in the text that would essentially stop the proposal if the divestment were found to cause more than a 0.05 percent loss in fund value.

“The bill takes all of that into account,” Grossman said. “The challenge is to not lose value in the fund because ultimately the taxpayers would have to pick that (difference) up.”

Grossman believes that if the bill passes, it would send a strong message to the fossil fuel industry that Massachusetts feels that it has an obligation to renewable energy.

Sen. Robert Hedlund, R-Weymouth, said that while he savors socially responsible investment, he would be surprised if the bill made it to the floor.

“I don’t want to impose my morality on the marketplace,” he said.

Hedlund said that Massachusetts had a much stronger moral obligation to divest from apartheid-era South Africa a few decades ago, but this issue is not morally comparable.

Sen. Marc Pacheco, D-Taunton, said that the pension fund would not be in jeopardy if the legislation passed.

“Investment in green activity would be healthier for the economy, public health and the environment,” Pacheco said.