PHOENIX -- The Arizona Diamondbacks can leave Chase Field to find a new home by 2022 without penalty following a vote by the Maricopa County Board of Supervisors.

The Diamondbacks reached an agreement with the Maricopa County Stadium District last week to allow the team to leave Chase Field up to five years early if it drops a lawsuit demanding $187 million in upgrades.

The board voted 4-1 on Wednesday to approve the deal.

The Diamondbacks have played at Chase Field in downtown Phoenix since 1998, when the franchise joined MLB as an expansion team.

The Diamondbacks filed the lawsuit last year, contending the ballpark needed major repairs and upgrades.