MASSACHUSETTS — (CNN) ExxonMobil has lost a key battle in an investigation into whether the oil giant misled the public about the dangers of climate change.

A Massachusetts judge ordered Exxon on Wednesday to hand over more than four decades of the company’s climate change research.

The court rejected Exxon’s emergency motion to kill the demand from Massachusetts Attorney General Maura Healey, who is investigating allegations the company ignored internal scientific research going back to the 1970s.

The ruling came on the same day that longtime Exxon boss Rex Tillerson was being grilled by Congress about the company’s climate change tactics at his secretary of state hearing. Tillerson, who stepped down last month as CEO after a decade in charge, repeatedly ducked questions about the issue from U.S. Senators.

Asked if he lacks the knowledge to respond or is simply refusing to answer, Tillerson said, “A little of both.”

Last April, Massachusetts demanded Exxon turn over documents going back to 1976 related to the company’s study of carbon emissions and the effects of those emissions on the climate.

This week Suffolk County Superior Court Judge Heidi Brieger upheld the attorney general’s demand.

“Exxon must now end its obstructive tactics and come clean about whether it misled Massachusetts consumers and investors about what it knew about climate change, its causes and effects,” the Massachusetts attorney general’s office said in a statement.

However, Exxon didn’t immediately signal whether it’s going to comply with the order.

“We are reviewing the ruling to determine next steps,” Exxon said in a statement.

Exxon is still awaiting a ruling in Texas, where the company has filed a complaint arguing that the Massachusetts demand for documents violates its federal constitutional rights.

In Wednesday’s ruling, the Massachusetts court declined to put the proceeding on hold until the Texas court rules.