CAMBRIDGE — It seemed like a sure thing. Working on weekends in a cramped fraternity room, four friends at MIT built a computer program that would give websites a new way to make money without online ads.
Not so fast.
New Jersey’s attorney general alleged the software had been used to hijack computers. Progress was halted while the authorities investigated. After more than a year, the inquiry ended and none of the students was charged with a crime. But by then, this past May, another company had already picked up on a similar idea.
The case reminded the Massachusetts Institute of Technology that, on a campus where students are encouraged to tinker and to turn their ideas into businesses, students had largely been left to navigate legal obstacles alone. Now, following a trend at colleges nationwide, MIT is partnering with Boston University’s law school to open a free legal clinic for campus entrepreneurs.
‘‘There is this increasing interest among our students to engage in innovation and entrepreneurial activities,’’ said Cynthia Barnhart, the chancellor of MIT and an engineering professor at the school of 11,000. ‘‘MIT students needed exactly these kinds of services.’’
Run by BU law students, the clinic helps get protection for their intellectual property, work with investors, and avoid legal pitfalls.
Next year, MIT is opening a second law clinic on Internet law, also in response to Tidbit, the project that was investigated by New Jersey. MIT drew scrutiny when it steered the students elsewhere for legal help, and a nonprofit ultimately represented them.
Jeremy Rubin, an MIT student who led Tidbit, said the controversy had a chilling effect among campus entrepreneurs. But with legal support from the school, he said, students across campus should feel free to pursue creative ideas, not just those who can afford a lawyer.
‘‘For students who are working on really innovative things, they need to be able to show people what they’re working on,’’ he said. ‘‘Making those resources available will be immensely helpful.’’
Along with traditional student-run legal clinics, which serve groups like military veterans and low-income families, more law schools are opening clinics that aim to help startups off the ground, especially those created on campus.
Dozens of clinics have been formed at US colleges in recent years, including at Northeastern University, where it worked with two students to get their energy bar, Coffeebar, sold at 300 stores.
‘‘These clinics are growing because there’s an unmet need,’’ said James Greif, spokesman for the Association of American Law Schools.
Clinics give law students important work experience, Greif said, while their clients get free advice. Colleges, meanwhile, can get a boost from the success stories. ‘‘Who doesn’t want to say that they were responsible in some way for the next Google or Facebook?’’ he said.
Even without a law degree, students running the clinics can handle most cases. They draft contracts, check the availability of trademarks, and work with investors. But there are limits. At Northeastern, for example, students don’t submit patent applications.
‘‘The students operate like a small startup law firm. They make decisions as group, they collaborate on their projects,’’ said Susan Montgomery, a professor at Northeastern, who advises the clinic.