Massachusetts would get 100 percent of its electricity from renewable sources by 2035 under a plan heard by lawmakers Tuesday. The bills would also require the state to renewably power all of its heating and transportation by 2050.

The bills (S. 1849, H. 3395) aim to move the state beyond its current clean energy commitment, which has focused primarily on electricity generation.

Environmental activists rallied outside the State House in support of the legislation before Tuesday's public hearing.

“We really need to move forward on embracing 100 percent renewable energy to power transportation and the building sector, if we’re serious about combating climate in Massachusetts, and we believe this bill would accomplish that,” Senator Jamie Eldridge, one of the bill's co-sponsors, told the Legislature's Joint Committee on Telecommunications, Utilities and Energy.

Tim Brennan of National Grid said the bill would result in higher prices and would not necessarily lead to investment in new renewable resources or more clean energy from existing projects.

“I think National Grid’s position is the Commonwealth should first take additional time to fully explore and consider these questions — what are we trying to achieve, how might we most cost-effectively achieve those,” Brennan said.

Brennan said taking more time will allow officials to see how successful current renewable energy projects have been towards reaching the state’s existing goals.