First District Judge Venoy Christofferson ruled Tuesday that Logan has a valid contract to provide electrical power to Utah State University.
However, Christofferson also ruled the city cannot start service to the school until it compensates UP&L at fair market value for the lines and poles now used by the utility to serve USU.
City and utility officials said they were far apart on an agreement.
UP&L attorney Cullen Battle said it would cost Logan a minimum of $94,000 to buy the equipment. He also said it may be possible for the city to temporarily lease the lines and poles.
However, Logan Mayor Newell Daines said it would cost the city less to build its own lines to the campus, and the city could have its lines in place in time to begin service by April 18.
However, Christofferson said that would not resolve the situation, and only when Logan compensates UP&L would the contract be legal.
Meantime, USU's switch to Logan municipal power will be the subject of a hearing April 19 before the Public Service Commission.