Phoenix: Glendale city leaders approved a new deal with the National Hockey League’s Arizona Coyotes on Friday, ending a contentious legal dispute and ensuring the team will play in the Phoenix suburb for at least two more years.

With a series of votes, the Glendale City Council unanimously gave the go-ahead to a revised management and lease agreement for the team to play at its city-owned arena through June 30, 2017.

The pact ends a legal battle that again cast doubt over the team’s immediate future in Arizona, but still leaves questions as to what may happen in the longer term.

Glendale Mayor Jerry Weiers said he believes the amended agreement benefits the city, the team and its vocal fan base.

“This is something that has been unpleasant for all of us,” said Weiers, before casting the final vote. “But it’s something that’s necessary ... the circumstances right now I think are great.”

Under the deal, the city will pay the team $6.5 million a year to manage the Gila River Arena, plus give them about $6 million from tickets surcharges, parking and naming rights.

The city had previously paid the Coyotes $15 million to manage the arena, but retained a share of the other revenue streams. The amended deal is expected to save Glendale about $2 million annually.