BOSTON — The fight over whether the country’s first offshore wind farm should be built off Cape Cod moves today to a Boston hearing room, where the project’s future turns on one question: Is the price of the electricity produced by the spinning turbines a good deal?

Today, hearings begin at the Massachusetts Department of Public Utilities, which will decide whether utility National Grid’s 15-year contract to buy half the turbines’ power is good for ratepayers.

Lawyers will present and cross-examine witnesses over 12 days of hearings that have been previewed in hundreds of pages of written testimony.

The hearings, the latest battlefield in a decade-long fight over Cape Wind, is unprecedented for the DPU. It’s the first long-term power deal the agency has considered since passage of a 2008 law that requires utilities to find more renewable sources of energy.

Rejection of the contract would be a huge blow to Cape Wind. The 130-turbine project, planned for Nantucket Sound, is estimated to cost at least $2 billion. To attract needed financing, Cape Wind must show investors that it has customers for its power. The company also must begin construction by the end of the year to qualify for key federal tax credits, and it can’t do so if it doesn’t secure the contract.

“This is an important moment,” said Matt Pawa, an attorney for the pro-Cape Wind group, Clean Power Now.