BOSTON — The Massachusetts House of Representatives has approved legislation that commits the state to the Paris climate accord even though the U.S. is no longer participating.

The House voted 145-10 on Wednesday in favor of the bill sponsored by Rep. Dylan Fernandes, a freshman Democrat from Falmouth.

Fernandes said he filed the bill in January in anticipation of President Donald Trump withdrawing the U.S. from the international agreement, which Trump later did.

Fernandes said rising sea levels are already having a major impact on his coastal district.

The bill would make Massachusetts a “non-party stakeholder” in the Paris accord.

Republican Gov. Charlie Baker and Democratic Attorney General Maura Healey have said previously that Massachusetts remains committed to the goals of the agreement, and will continue steps toward reduce greenhouse gas emissions.