Lawyers for Harvard University will appear in court on Friday to fight off attempts to force the world’s richest university to dump coal, oil and gas companies from its $36bn (£23bn) endowment.



A lawsuit filed late last year by seven law students and undergraduates argues the university has a duty to fight climate change by pulling out of fossil fuel companies.



The university and the state of Massachusetts, which is also named in the lawsuit, are asking the judge to dismiss the case.



But a student sit-in at the Harvard president’s offices last week – and the rapid expansion of the campus divestment movement – suggest that the university can expect continued pressure.

“This is important to us because climate change is supposed to be a huge problem and so far our existing institutions have been unable to address it in a way that is commensurate with the problem,” said Alice Cherry, a second year law student and one of the seven bringing the suit. “We think it is past time for our legal system to have something to say about it.”



The lawsuit argues that Harvard, by continuing to invest in fossil fuels, is putting current and future generations in danger.



“Such investments contribute to current and future damage to the University’s reputation and to that of its students and graduates, to the ability of students to study and thrive free from the threat of catastrophic climate change, and to future damage to the university’s physical campus as a result of sea-level rise and increased storm activity,” the complaint contends.



The students are calling for Harvard to withdraw immediately from an estimated $79m in direct investments in coal, oil and gas companies, and begin phasing out all other investments containing fossil fuel stocks.



The lawsuit puts a growing spotlight on Harvard, as the world’s richest university. Over the last few years, the divestment movement has jumped from college campuses to charitable foundations and pensions funds – with the recent crash of oil prices strengthening the financial argument for getting out of fossil fuels.



Last week, 34 Harvard students staged a sit-in outside the offices of the university president, Drew Gilpin Faust. More than 230 faculty members have signed a letter calling on Harvard to drop oil and coal companies.



So far, Harvard hasn’t budged on its refusal to divest. In 2013, when Harvard was first confronted with divestment demands, Faust responded that the endowment was set up to support academic aims, and not serve other purposes.



The university said its lawyers would urge the judge to dismiss the lawsuit.



“Climate change poses a serious threat to our planet. Harvard agrees that this threat must be confronted, but we have focused our efforts on supporting the research and teaching that will ultimately create the solutions to this challenge,” Jeff Neal, a university spokesman, said in an email.



The email accused last week’s sit-in protesters of coercion, and said they had crossed the line into unacceptable forms of protest.

“We are deeply disappointed that divestment advocates have chosen to resort to a disruptive building occupation as a means to advance their view. Such tactics cross the line from persuasion to disrespectful and coercive interference with the activities of others.”